File tree Expand file tree Collapse file tree 1 file changed +17
-19
lines changed
root/etc/s6-overlay/s6-rc.d/init-speedtest-tracker-config Expand file tree Collapse file tree 1 file changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -63,30 +63,28 @@ lsiown -R abc:abc \
6363 /app/www/storage
6464
6565# Check for env file
66- if [[ ! -f /config/.env ]]; then
67- cp /app/www/.env.production /config/.env
68- fi
69-
70- # create symlinks
71- symlinks=( \
72- /app/www/.env \
73- )
66+ if [[ -f /config/.env ]]; then
67+ # create symlinks
68+ symlinks=( \
69+ /app/www/.env \
70+ )
7471
75- for i in "${symlinks[@]}"
76- do
77- if [[ -e "$i" && ! -L "$i" ]]; then
78- rm -rf "$i"
79- fi
80- if [[ ! -L "$i" ]]; then
81- ln -s /config/"$(basename "$i")" "$i"
82- fi
83- done
72+ for i in "${symlinks[@]}"
73+ do
74+ if [[ -e "$i" && ! -L "$i" ]]; then
75+ rm -rf "$i"
76+ fi
77+ if [[ ! -L "$i" ]]; then
78+ ln -s /config/"$(basename "$i")" "$i"
79+ fi
80+ done
81+ fi
8482
8583# Check for app key
8684if [[ -z ${APP_KEY} ]]; then
87- if ! grep -E "APP_KEY=[0-9A-Za-z:+\/=]{1,}" /app/www/.env > /dev/null; then
85+ if ! grep -qE "APP_KEY=[0-9A-Za-z:+\/=]{1,}" /app/www/.env 2 > /dev/null; then
8886 echo "An application key is missing!"
89- echo "Go to https://speedtest-tracker.dev/ generate an application key ."
87+ echo "You can generate a key at https://speedtest-tracker.dev/."
9088 fi
9189fi
9290
You can’t perform that action at this time.
0 commit comments