OpenSource CLI-App to install and handle stuff related to Web-Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

54 lines
1.2 KiB

<?php
namespace App\Commands;
use Illuminate\Console\Scheduling\Schedule;
use LaravelZero\Framework\Commands\Command;
use App\Facades\Install;
/**
* Install php-fpm
*
* @author Björn Hase, Tentakelfabrik
* @license http://opensource.org/licenses/MIT The MIT License
* @link https://gitea.tentakelfabrik.de/Tentakelfabrik/mcp
*
*/
class AdminerInstallCommand extends Command
{
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'adminer:install {destination}';
/**
* The description of the command.
*
* @var string
*/
protected $description = 'Install Adminer.';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->info('Adminer installing...');
// download adminer
system('wget "http://www.adminer.org/latest.php" -O '.$this->argument('destination').'/index.php');
// check if nginx is ready and installed
if (file_exists($this->argument('destination').'/index.php')) {
$this->info('Adminer installing...Success! \o/');
} else {
$this->error('Failed! Please check log-file!');
}
}
}