seafile-containerized/image/seafile/create_data_links.sh
Shuai Lin c64dbb972d Restructure "shared" folder.
shared/seafile => contains ccnet/seafile-data/conf etc.
shared/db      => contains mysql data
shared/ssl     => letsencrypt certs
shared/logs/seafile => ccnet/seafile/seahub logs
shared/logs/var-log => mounted as /var/log in the container
2016-11-12 14:03:52 +08:00

30 lines
414 B
Bash
Executable file

#!/bin/bash
set -e
set -o pipefail
if [[ $SEAFILE_BOOTSRAP != "" ]]; then
exit 0
fi
dirs=(
conf
ccnet
seafile-data
seahub-data
seahub.db
)
for d in ${dirs[*]}; do
src=/shared/seafile/$d
if [[ -e $src ]]; then
ln -sf $src /opt/seafile/
fi
done
if [[ -e /shared/logs/seafile ]]; then
ln -sf /shared/logs/seafile/ /opt/seafile/logs
fi
# TODO: create avatars link