mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-27 03:03:38 +09:00
Remove logrotate and symlink logs
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
# make our folders
|
# make our folders
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/config/www/{backgrounds,icons,avatars,SupportedApps} \
|
/config/www/{avatars,backgrounds,icons,logs,SupportedApps} \
|
||||||
/app/www \
|
/app/www \
|
||||||
/config/log/heimdall
|
/config/log/heimdall
|
||||||
|
|
||||||
@@ -20,31 +21,25 @@ if [[ -f /heimdall/heimdall.tar.gz ]]; then
|
|||||||
fi
|
fi
|
||||||
# create symlinks
|
# create symlinks
|
||||||
|
|
||||||
symlinks=( \
|
symlinks=(
|
||||||
/app/www/storage/app/public/avatars \
|
/app/www/storage/app/public/avatars
|
||||||
/app/www/storage/app/public/backgrounds \
|
/app/www/storage/app/public/backgrounds
|
||||||
/app/www/storage/app/public/icons \
|
/app/www/storage/app/public/icons
|
||||||
/app/www/app/SupportedApps \
|
/app/www/storage/logs
|
||||||
/app/www/database/app.sqlite \
|
/app/www/app/SupportedApps
|
||||||
/app/www/.env )
|
/app/www/database/app.sqlite
|
||||||
|
/app/www/.env
|
||||||
|
)
|
||||||
|
|
||||||
for i in "${symlinks[@]}"
|
for i in "${symlinks[@]}"; do
|
||||||
do
|
if [[ -e "${i}" && ! -L "${i}" ]]; then
|
||||||
if [[ -e "$i" && ! -L "$i" ]]; then
|
rm -rf "${i}"
|
||||||
rm -rf "$i"
|
|
||||||
fi
|
fi
|
||||||
if [[ ! -L "$i" ]]; then
|
if [[ ! -L "${i}" ]]; then
|
||||||
ln -s /config/www/"$(basename "$i")" "$i"
|
ln -s /config/www/"$(basename "${i}")" "${i}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
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/heimdall/laravel.log" "/app/www/storage/logs/laravel.log"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# copy .env if not exists
|
# copy .env if not exists
|
||||||
if [[ ! -f /config/www/.env ]]; then
|
if [[ ! -f /config/www/.env ]]; then
|
||||||
cp /app/www/.env.example /config/www/.env
|
cp /app/www/.env.example /config/www/.env
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
/config/log/heimdall/laravel.log {
|
|
||||||
size 5M
|
|
||||||
rotate 5
|
|
||||||
compress
|
|
||||||
nodateext
|
|
||||||
notifempty
|
|
||||||
missingok
|
|
||||||
su abc abc
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user