mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
Merge pull request #189 from haiwen/seafile-logs-nginx-conf-2
mv seafile/logs to /shared/seafile/logs & persistence nginx config file.
This commit is contained in:
commit
50829d07a7
|
@ -194,7 +194,7 @@ COMPRESS_CACHE_BACKEND = 'locmem'""")
|
||||||
# container, we need to move them to the shared volume
|
# container, we need to move them to the shared volume
|
||||||
#
|
#
|
||||||
# e.g move "/opt/seafile/seafile-data" to "/shared/seafile/seafile-data"
|
# 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:
|
for fn in files_to_copy:
|
||||||
src = join(topdir, fn)
|
src = join(topdir, fn)
|
||||||
dst = join(shared_seafiledir, fn)
|
dst = join(shared_seafiledir, fn)
|
||||||
|
|
|
@ -18,17 +18,12 @@ if [[ $TIME_ZONE != "" ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -e /shared/logs/seafile ]]; then
|
|
||||||
mv /shared/logs/seafile /shared/seafile/logs
|
|
||||||
fi
|
|
||||||
|
|
||||||
dirs=(
|
dirs=(
|
||||||
conf
|
conf
|
||||||
ccnet
|
ccnet
|
||||||
seafile-data
|
seafile-data
|
||||||
seahub-data
|
seahub-data
|
||||||
pro-data
|
pro-data
|
||||||
logs
|
|
||||||
seafile-license.txt
|
seafile-license.txt
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -39,8 +34,15 @@ for d in ${dirs[*]}; do
|
||||||
fi
|
fi
|
||||||
done
|
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
|
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
|
fi
|
||||||
rm -rf /var/log && ln -sf /shared/logs/var-log /var/log
|
rm -rf /var/log && ln -sf /shared/logs/var-log /var/log
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue