mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
mv seafile/logs to /shared/seafile/logs & persistence nginx config file.
This commit is contained in:
parent
2f74f30ee0
commit
55930f2859
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue