mv seafile/logs to /shared/seafile/logs & persistence nginx config file.

This commit is contained in:
root 2019-11-19 12:09:21 +08:00
parent 2f74f30ee0
commit 55930f2859
2 changed files with 9 additions and 7 deletions

View file

@ -194,7 +194,7 @@ COMPRESS_CACHE_BACKEND = 'locmem'""")
# container, we need to move them to the shared volume
#
# e.g move "/opt/seafile/seafile-data" to "/shared/seafile/seafile-data"
files_to_copy = ['conf', 'ccnet', 'seafile-data', 'seahub-data', 'pro-data', 'logs']
files_to_copy = ['conf', 'ccnet', 'seafile-data', 'seahub-data', 'pro-data']
for fn in files_to_copy:
src = join(topdir, fn)
dst = join(shared_seafiledir, fn)

View file

@ -18,17 +18,12 @@ if [[ $TIME_ZONE != "" ]]; then
fi
fi
if [[ -e /shared/logs/seafile ]]; then
mv /shared/logs/seafile /shared/seafile/logs
fi
dirs=(
conf
ccnet
seafile-data
seahub-data
pro-data
logs
seafile-license.txt
)
@ -39,8 +34,15 @@ for d in ${dirs[*]}; do
fi
done
if [[ -e /shared/logs/seafile ]]; then
mv /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
if [[ ! -e /shared/logs/var-log ]]; then
mv /var/log /shared/logs/var-log
mkdir -p /shared/logs/ && mv /var/log /shared/logs/var-log
fi
rm -rf /var/log && ln -sf /shared/logs/var-log /var/log