Dont overwrite APP_KEY if it already exists

This commit is contained in:
1Day 2022-02-07 15:44:59 +01:00
parent e9e539c8c5
commit d3f7e1979b
14 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View file

@ -22,3 +22,4 @@ storage/invoices.zip
storage/app/public/logo.png storage/app/public/logo.png
*vscode *vscode
- Kopie.env - Kopie.env
public/install/logs.txt

0
bin/test.sh Executable file → Normal file
View file

0
bootstrap/cache/.gitignore vendored Executable file → Normal file
View file

0
config/trustedproxy.php Executable file → Normal file
View file

View file

@ -71,7 +71,11 @@ if (isset($_POST['feedDB'])) {
#$logs .= run_console('composer install --no-dev --optimize-autoloader'); #$logs .= run_console('composer install --no-dev --optimize-autoloader');
$logs .= run_console('php artisan migrate --seed --force'); $logs .= run_console('php artisan migrate --seed --force');
$logs .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force'); $logs .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force');
if (strpos(getEnvironmentValue("APP_KEY"), 'base64') === false) {
$logs .= run_console('php artisan key:generate --force'); $logs .= run_console('php artisan key:generate --force');
}else{
$logs .= "Key already exists. Skipping\n";
}
$logs .= run_console('php artisan storage:link'); $logs .= run_console('php artisan storage:link');
$logsfile = fopen("logs.txt", "w") or die("Unable to open file!"); $logsfile = fopen("logs.txt", "w") or die("Unable to open file!");

0
storage/app/.gitignore vendored Executable file → Normal file
View file

0
storage/app/public/.gitignore vendored Executable file → Normal file
View file

0
storage/framework/.gitignore vendored Executable file → Normal file
View file

0
storage/framework/cache/.gitignore vendored Executable file → Normal file
View file

0
storage/framework/cache/data/.gitignore vendored Executable file → Normal file
View file

0
storage/framework/sessions/.gitignore vendored Executable file → Normal file
View file

0
storage/framework/testing/.gitignore vendored Executable file → Normal file
View file

0
storage/framework/views/.gitignore vendored Executable file → Normal file
View file

0
storage/logs/.gitignore vendored Executable file → Normal file
View file