From d3f7e1979b8d35391d8b3b1e1d4dae3f76ac33a8 Mon Sep 17 00:00:00 2001 From: 1Day Date: Mon, 7 Feb 2022 15:44:59 +0100 Subject: [PATCH] Dont overwrite APP_KEY if it already exists --- .gitignore | 1 + bin/test.sh | 0 bootstrap/cache/.gitignore | 0 config/trustedproxy.php | 0 public/install/forms.php | 6 +++++- storage/app/.gitignore | 0 storage/app/public/.gitignore | 0 storage/framework/.gitignore | 0 storage/framework/cache/.gitignore | 0 storage/framework/cache/data/.gitignore | 0 storage/framework/sessions/.gitignore | 0 storage/framework/testing/.gitignore | 0 storage/framework/views/.gitignore | 0 storage/logs/.gitignore | 0 14 files changed, 6 insertions(+), 1 deletion(-) mode change 100755 => 100644 bin/test.sh mode change 100755 => 100644 bootstrap/cache/.gitignore mode change 100755 => 100644 config/trustedproxy.php mode change 100755 => 100644 storage/app/.gitignore mode change 100755 => 100644 storage/app/public/.gitignore mode change 100755 => 100644 storage/framework/.gitignore mode change 100755 => 100644 storage/framework/cache/.gitignore mode change 100755 => 100644 storage/framework/cache/data/.gitignore mode change 100755 => 100644 storage/framework/sessions/.gitignore mode change 100755 => 100644 storage/framework/testing/.gitignore mode change 100755 => 100644 storage/framework/views/.gitignore mode change 100755 => 100644 storage/logs/.gitignore diff --git a/.gitignore b/.gitignore index 57290b7a..4565559a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ storage/invoices.zip storage/app/public/logo.png *vscode - Kopie.env +public/install/logs.txt diff --git a/bin/test.sh b/bin/test.sh old mode 100755 new mode 100644 diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore old mode 100755 new mode 100644 diff --git a/config/trustedproxy.php b/config/trustedproxy.php old mode 100755 new mode 100644 diff --git a/public/install/forms.php b/public/install/forms.php index b6cba6ac..8b6dbf01 100644 --- a/public/install/forms.php +++ b/public/install/forms.php @@ -71,7 +71,11 @@ if (isset($_POST['feedDB'])) { #$logs .= run_console('composer install --no-dev --optimize-autoloader'); $logs .= run_console('php artisan migrate --seed --force'); $logs .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force'); - $logs .= run_console('php artisan key:generate --force'); + if (strpos(getEnvironmentValue("APP_KEY"), 'base64') === false) { + $logs .= run_console('php artisan key:generate --force'); + }else{ + $logs .= "Key already exists. Skipping\n"; + } $logs .= run_console('php artisan storage:link'); $logsfile = fopen("logs.txt", "w") or die("Unable to open file!"); diff --git a/storage/app/.gitignore b/storage/app/.gitignore old mode 100755 new mode 100644 diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/cache/data/.gitignore b/storage/framework/cache/data/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore old mode 100755 new mode 100644 diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore old mode 100755 new mode 100644