Skip to content

Commit

Permalink
Merge pull request #21 from linuxserver/laravel-log
Browse files Browse the repository at this point in the history
Symlink laravel log to /config
  • Loading branch information
thespad authored Jun 9, 2024
2 parents 548e6a3 + a64c0f6 commit 306aa1e
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions root/etc/s6-overlay/s6-rc.d/init-speedtest-tracker-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,21 @@ lsiown -R abc:abc \

# Check for env file
if [[ -f /config/.env ]]; then
# create symlinks
symlinks=( \
/app/www/.env \
)
if [[ -e "/app/www/.env" && ! -L "/app/www/.env" ]]; then
rm -rf "/app/www/.env"
fi
if [[ ! -L "/app/www/.env" ]]; then
ln -s "/config/.env" "/app/www/.env"
fi
fi

for i in "${symlinks[@]}"
do
if [[ -e "$i" && ! -L "$i" ]]; then
rm -rf "$i"
fi
if [[ ! -L "$i" ]]; then
ln -s /config/"$(basename "$i")" "$i"
fi
done
touch /config/log/laravel.log

if [[ -e "/app/www/storage/logs/laravel.log" && ! -L "/app/www/storage/logs/laravel.log" ]]; then
rm -rf "/app/www/storage/logs/laravel.log"
fi
if [[ ! -L "/app/www/storage/logs/laravel.log" ]]; then
ln -s "/config/log/laravel.log" "/app/www/storage/logs/laravel.log"
fi

# Check for app key
Expand Down

0 comments on commit 306aa1e

Please sign in to comment.