Minor-upgrade: support media/custom dir.

This commit is contained in:
Shuai Lin 2016-11-28 15:06:23 +08:00
parent 65a328d14e
commit 42c7be4c05

View file

@ -25,13 +25,19 @@ if [[ -e /shared/logs/seafile ]]; then
ln -sf /shared/logs/seafile/ /opt/seafile/logs
fi
if [[ ! -e /opt/seafile/seafile-server-latest ]]; then
ln -sf /opt/seafile/seafile-server-$SEAFILE_VERSION /opt/seafile/seafile-server-latest
current_version_dir=/opt/seafile/seafile-server-${SEAFILE_VERSION}
latest_version_dir=/opt/seafile/seafile-server-latest
seahub_data_dir=/shared/seafile/seahub-data
if [[ ! -e ${latest_version_dir} ]]; then
ln -sf ${current_version_dir} ${latest_version_dir}
fi
source_avatars_dir=/opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/media/avatars
source_avatars_dir=${current_version_dir}/seahub/media/avatars
rm -rf $source_avatars_dir
ln -sf ${seahub_data_dir}/avatars $source_avatars_dir
ln -sf /shared/seafile/seahub-data/avatars $source_avatars_dir
# TODO: create avatars link
source_custom_dir=${current_version_dir}/seahub/media/custom
rm -rf $source_custom_dir
mkdir -p ${seahub_data_dir}/custom
ln -sf ${seahub_data_dir}/custom $source_custom_dir