seafile-server: remove log links, remove old log folders on startup

This commit is contained in:
Gerrit Gogel 2021-01-24 16:02:17 +01:00
parent f131b8e3f6
commit 2792af6311

View file

@ -35,13 +35,11 @@ for d in ${dirs[*]}; do
done done
if [[ -e /shared/logs/seafile ]]; then if [[ -e /shared/logs/seafile ]]; then
mv /shared/logs/seafile /shared/seafile/logs rm -rf /shared/logs/seafile /shared/seafile/logs
rm -rf /opt/seafile/logs && ln -sf /shared/seafile/logs /opt/seafile/
else
mkdir -p /shared/seafile/logs && ln -sf /shared/seafile/logs /opt/seafile/
fi fi
if [[ -e /shared/seafile/logs ]]; then
if [[ ! -e /shared/logs/var-log ]]; then rm -rf /shared/seafile/logs
mkdir -p /shared/logs/ && mv /var/log /shared/logs/var-log fi
if [[ -e /shared/logs/var-log ]]; then
rm -rf /shared/logs/var-log
fi fi
rm -rf /var/log && ln -sf /shared/logs/var-log /var/log