Skip to content

Commit ea2b9b9

Browse files
authored
Merge pull request #99 from linuxserver/env-check
Check for zero length .env on startup
2 parents 14b05b9 + 2b230fb commit ea2b9b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

root/etc/cont-init.d/50-config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ mkdir -p \
88
[[ ! -f "/config/www/.env" ]] && \
99
cp /var/www/html/.env.example /config/www/.env
1010

11+
# check for zero-length .env and alert user if found
12+
[[ ! -s "/config/www/.env" ]] && \
13+
echo "WARNING: zero-length .env file detected. Please delete /config/www/.env and restart the container"
14+
1115
# create symlinks
1216
symlinks=( \
1317
/var/www/html/storage/uploads/files \

0 commit comments

Comments
 (0)