mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
64fe84a660
commit
75782e265a
7 changed files with 95 additions and 64 deletions
|
@ -45,19 +45,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
phyre-php artisan phyre:set-ini-settings APP_URL "127.0.0.1:8443"
|
||||
phyre-php artisan phyre:set-ini-settings APP_ENV "production"
|
||||
phyre-php artisan phyre:set-ini-settings APP_NAME "PHYRE_PANEL"
|
||||
phyre-php artisan phyre:set-ini-settings DB_DATABASE "$PHYRE_PANEL_DB_NAME"
|
||||
phyre-php artisan phyre:set-ini-settings DB_USERNAME "$PHYRE_PANEL_DB_USER"
|
||||
phyre-php artisan phyre:set-ini-settings DB_PASSWORD "$PHYRE_PANEL_DB_PASSWORD"
|
||||
phyre-php artisan phyre:set-ini-settings DB_CONNECTION "mysql"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_USERNAME "$MYSQL_PHYRE_ROOT_USERNAME"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_PASSWORD "$MYSQL_PHYRE_ROOT_PASSWORD"
|
||||
phyre-php artisan phyre:key-generate
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
phyre-php artisan db:seed
|
||||
|
||||
|
|
|
@ -45,19 +45,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
phyre-php artisan phyre:set-ini-settings APP_URL "127.0.0.1:8443"
|
||||
phyre-php artisan phyre:set-ini-settings APP_ENV "production"
|
||||
phyre-php artisan phyre:set-ini-settings APP_NAME "PHYRE_PANEL"
|
||||
phyre-php artisan phyre:set-ini-settings DB_DATABASE "$PHYRE_PANEL_DB_NAME"
|
||||
phyre-php artisan phyre:set-ini-settings DB_USERNAME "$PHYRE_PANEL_DB_USER"
|
||||
phyre-php artisan phyre:set-ini-settings DB_PASSWORD "$PHYRE_PANEL_DB_PASSWORD"
|
||||
phyre-php artisan phyre:set-ini-settings DB_CONNECTION "mysql"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_USERNAME "$MYSQL_PHYRE_ROOT_USERNAME"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_PASSWORD "$MYSQL_PHYRE_ROOT_PASSWORD"
|
||||
phyre-php artisan phyre:key-generate
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
phyre-php artisan db:seed
|
||||
|
||||
|
|
|
@ -126,19 +126,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
phyre-php artisan phyre:set-ini-settings APP_URL "127.0.0.1:8443"
|
||||
phyre-php artisan phyre:set-ini-settings APP_ENV "production"
|
||||
phyre-php artisan phyre:set-ini-settings APP_NAME "PHYRE_PANEL"
|
||||
phyre-php artisan phyre:set-ini-settings DB_DATABASE "$PHYRE_PANEL_DB_NAME"
|
||||
phyre-php artisan phyre:set-ini-settings DB_USERNAME "$PHYRE_PANEL_DB_USER"
|
||||
phyre-php artisan phyre:set-ini-settings DB_PASSWORD "$PHYRE_PANEL_DB_PASSWORD"
|
||||
phyre-php artisan phyre:set-ini-settings DB_CONNECTION "mysql"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_USERNAME "$MYSQL_PHYRE_ROOT_USERNAME"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_PASSWORD "$MYSQL_PHYRE_ROOT_PASSWORD"
|
||||
phyre-php artisan phyre:key-generate
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
phyre-php artisan db:seed
|
||||
|
||||
|
|
|
@ -45,19 +45,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
phyre-php artisan phyre:set-ini-settings APP_URL "127.0.0.1:8443"
|
||||
phyre-php artisan phyre:set-ini-settings APP_ENV "production"
|
||||
phyre-php artisan phyre:set-ini-settings APP_NAME "PHYRE_PANEL"
|
||||
phyre-php artisan phyre:set-ini-settings DB_DATABASE "$PHYRE_PANEL_DB_NAME"
|
||||
phyre-php artisan phyre:set-ini-settings DB_USERNAME "$PHYRE_PANEL_DB_USER"
|
||||
phyre-php artisan phyre:set-ini-settings DB_PASSWORD "$PHYRE_PANEL_DB_PASSWORD"
|
||||
phyre-php artisan phyre:set-ini-settings DB_CONNECTION "mysql"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_USERNAME "$MYSQL_PHYRE_ROOT_USERNAME"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_PASSWORD "$MYSQL_PHYRE_ROOT_PASSWORD"
|
||||
phyre-php artisan phyre:key-generate
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
phyre-php artisan db:seed
|
||||
|
||||
|
|
|
@ -128,19 +128,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
phyre-php artisan phyre:set-ini-settings APP_URL "127.0.0.1:8443"
|
||||
phyre-php artisan phyre:set-ini-settings APP_ENV "production"
|
||||
phyre-php artisan phyre:set-ini-settings APP_NAME "PHYRE_PANEL"
|
||||
phyre-php artisan phyre:set-ini-settings DB_DATABASE "$PHYRE_PANEL_DB_NAME"
|
||||
phyre-php artisan phyre:set-ini-settings DB_USERNAME "$PHYRE_PANEL_DB_USER"
|
||||
phyre-php artisan phyre:set-ini-settings DB_PASSWORD "$PHYRE_PANEL_DB_PASSWORD"
|
||||
phyre-php artisan phyre:set-ini-settings DB_CONNECTION "mysql"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_USERNAME "$MYSQL_PHYRE_ROOT_USERNAME"
|
||||
phyre-php artisan phyre:set-ini-settings MYSQL_ROOT_PASSWORD "$MYSQL_PHYRE_ROOT_PASSWORD"
|
||||
phyre-php artisan phyre:key-generate
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
phyre-php artisan db:seed
|
||||
|
||||
|
|
38
web/app/Console/Commands/KeyGenerate.php
Normal file
38
web/app/Console/Commands/KeyGenerate.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Jelix\IniFile\IniModifier;
|
||||
|
||||
class KeyGenerate extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'phyre:key-generate';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$randomAppKey = 'base64:'.base64_encode(random_bytes(32));
|
||||
|
||||
$ini = new IniModifier('phyre-config.ini');
|
||||
$ini->setValue('APP_KEY', $randomAppKey, 'phyre');
|
||||
$ini->save();
|
||||
|
||||
$this->info('Application key set successfully.');
|
||||
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ class SetIniSettings extends Command
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'phyre:set-ini-settings';
|
||||
protected $signature = 'phyre:set-ini-settings {key} {value}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
|
@ -27,9 +27,12 @@ class SetIniSettings extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
// $ini = new IniModifier('phyre-config.ini');
|
||||
// $ini->setValue($key, $value, 'phyre');
|
||||
// $ini->save();
|
||||
$key = $this->argument('key');
|
||||
$value = $this->argument('value');
|
||||
|
||||
$ini = new IniModifier('phyre-config.ini');
|
||||
$ini->setValue($key, $value, 'phyre');
|
||||
$ini->save();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue