Updated entrypoint to chown only in <4

This commit is contained in:
Lee Ween Jiann
2021-03-24 08:14:30 +08:00
parent 18fb27ad9f
commit a604f4e8b6
2 changed files with 5 additions and 1 deletions

View File

@@ -40,4 +40,3 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

View File

@@ -82,6 +82,11 @@ elif [ -d "$BAK_PUBLIC_PATH/logo" ]; then
fi
rm -rf "$BAK_PUBLIC_PATH"
# Set permission for web server to create/update files (only <v4)
if [[ ${str::1} -le 4 ]]; then
chown -R "$INVOICENINJA_USER":www-data /var/www/app/storage /var/www/app/public /var/www/app/bootstrap
fi
# Initialize values that might be stored in a file
file_env 'APP_KEY'
file_env 'API_SECRET'