From 278637ef3a92af8381708931eeb8b8bb94f93e06 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 27 Oct 2023 15:15:41 +0200 Subject: [PATCH] only generate oidc secret for oidc --- start.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/start.sh b/start.sh index d2b6937..9ec67f2 100755 --- a/start.sh +++ b/start.sh @@ -22,12 +22,6 @@ if ! [ -f /app/data/.installed ]; then echo "==> Done." fi -echo "==> Get OAUTH Crypto Passphrase" -if [[ ! -f /app/data/.oauth_crypto_passphrase ]]; then - openssl rand -base64 42 > /app/data/.oauth_crypto_passphrase -fi -export OIDC_CRYPTO_PASSPHRASE=$( /app/data/php.ini fi @@ -45,18 +39,20 @@ for f in $(ls /app/code/extensions-orig); do done echo "==> Updating config file" -php cli/reconfigure.php --default_user admin --base_url "https://${CLOUDRON_APP_DOMAIN}" \ +if [[ -z "${CLOUDRON_OIDC_ISSUER:-}" ]]; then + extra_args="--default_user admin" + [[ ! -f /app/data/.oauth_crypto_passphrase ]] && openssl rand -base64 42 > /app/data/.oauth_crypto_passphrase + export OIDC_CRYPTO_PASSPHRASE=$( Setting permissions" chown -R www-data.www-data /run/php /app/data /tmp/log_api.txt