1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 10:32:31 +01:00

Update composer; fix environment setting

This commit is contained in:
Dane Everitt 2016-01-25 20:30:50 -05:00
parent 96592e2875
commit 4a7fdaedde
2 changed files with 12 additions and 5 deletions

View File

@ -84,9 +84,12 @@ class UpdateEnvironment extends Command
$this->line('Writing new environment configuration to file.');
foreach ($variables as $key => $value) {
$regex = '/^' . $key . '=(.*)$/m';
$replace = $key . '=' . $value;
$envContents = preg_replace($regex, $replace, $envContents);
$newValue = $key . '=' . $value;
if (preg_match_all('/^' . $key . '=(.*)$/m', $envContents) < 1) {
$envContents = $envContents . "\n" . $newValue;
} else {
$envContents = preg_replace('/^' . $key . '=(.*)$/m', $newValue, $envContents);
}
$bar->advance();
}

View File

@ -74,13 +74,17 @@
"sed -i.bak 's/homestead.app/pterodactyl.local/g' Homestead.yaml",
"rm Homestead.yaml.bak",
"php artisan key:generate",
"php artisan pterodactyl:env"
"php artisan pterodactyl:env",
"php artisan migrate",
"php artisan pterodactyl:user"
],
"setup": [
"composer install --ansi --no-dev",
"php -r \"copy('.env.example', '.env');\"",
"php artisan key:generate",
"php artisan pterodactyl:env"
"php artisan pterodactyl:env",
"php artisan migrate",
"php artisan pterodactyl:user"
]
},
"config": {