From 2b230fb5f9db875f4dc84bb2e9984ccaba37be83 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 7 Jun 2021 16:12:00 +0100 Subject: [PATCH] Check for zero length .env on startup --- root/etc/cont-init.d/50-config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 3c999b4..0dd0e6f 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -8,6 +8,10 @@ mkdir -p \ [[ ! -f "/config/www/.env" ]] && \ cp /var/www/html/.env.example /config/www/.env +# check for zero-length .env and alert user if found +[[ ! -s "/config/www/.env" ]] && \ + echo "WARNING: zero-length .env file detected. Please delete /config/www/.env and restart the container" + # create symlinks symlinks=( \ /var/www/html/storage/uploads/files \