2016-11-11 04:54:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -o pipefail
|
|
|
|
|
2016-11-11 04:56:47 +00:00
|
|
|
if [[ $SEAFILE_BOOTSRAP != "" ]]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-11-11 04:54:47 +00:00
|
|
|
dirs=(
|
|
|
|
conf
|
|
|
|
ccnet
|
|
|
|
seafile-data
|
|
|
|
seahub-data
|
|
|
|
seahub.db
|
|
|
|
)
|
|
|
|
|
|
|
|
for d in ${dirs[*]}; do
|
2016-11-12 06:03:52 +00:00
|
|
|
src=/shared/seafile/$d
|
2016-11-11 04:54:47 +00:00
|
|
|
if [[ -e $src ]]; then
|
|
|
|
ln -sf $src /opt/seafile/
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2016-11-12 06:03:52 +00:00
|
|
|
if [[ -e /shared/logs/seafile ]]; then
|
|
|
|
ln -sf /shared/logs/seafile/ /opt/seafile/logs
|
|
|
|
fi
|
2016-11-11 04:54:47 +00:00
|
|
|
|
2016-11-14 06:47:40 +00:00
|
|
|
if [[ ! -e /opt/seafile/seafile-server-latest ]]; then
|
|
|
|
ln -sf /opt/seafile/seafile-server-$SEAFILE_VERSION /opt/seafile/seafile-server-latest
|
|
|
|
fi
|
|
|
|
|
2016-11-11 04:54:47 +00:00
|
|
|
# TODO: create avatars link
|