mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
wait for conf and data folder init before creating sym links
This commit is contained in:
parent
c2bedff29d
commit
a99b8053b4
|
@ -18,6 +18,11 @@ if [[ $TIME_ZONE != "" ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
while [[ ! -e /shared/seafile/conf || ! -e /shared/seafile/ccnet || ! -e /shared/seafile/seafile-data || ! -e /shared/seafile/seahub-data ]]; do
|
||||||
|
echo "Waiting for initialization by seafile-server..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
dirs=(
|
dirs=(
|
||||||
conf
|
conf
|
||||||
ccnet
|
ccnet
|
||||||
|
@ -34,14 +39,14 @@ for d in ${dirs[*]}; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ! -e /shared/seafile/conf/seahub.conf ]]; then
|
#ln -sf /shared/seafile/seahub-data /opt/seafile/seafile-server-latest/seahub-data
|
||||||
mv /opt/seafile/seafile-server-latest/runtime/seahub.conf /shared/seafile/conf/seahub.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f /opt/seafile/seafile-server-latest/runtime/seahub.conf
|
|
||||||
ln -sf /shared/seafile/conf/seahub.conf /opt/seafile/seafile-server-latest/runtime/seahub.conf
|
|
||||||
ln -sf /shared/seafile/seahub-data /opt/seafile/seafile-server-latest/seahub-data
|
|
||||||
rm -rf /opt/seafile/seafile-server-latest/seahub/media/avatars
|
rm -rf /opt/seafile/seafile-server-latest/seahub/media/avatars
|
||||||
rm -rf /opt/seafile/seafile-server-latest/seahub/media/custom
|
rm -rf /opt/seafile/seafile-server-latest/seahub/media/custom
|
||||||
ln -sf /shared/seafile/seahub-data/avatars /opt/seafile/seafile-server-latest/seahub/media
|
ln -sf /shared/seafile/seahub-data/avatars /opt/seafile/seafile-server-latest/seahub/media
|
||||||
ln -sf /shared/seafile/seahub-data/custom /opt/seafile/seafile-server-latest/seahub/media
|
ln -sf /shared/seafile/seahub-data/custom /opt/seafile/seafile-server-latest/seahub/media
|
||||||
|
|
||||||
|
if [[ ! -e /shared/seafile/conf/seahub.conf ]]; then
|
||||||
|
mv /opt/seafile/seafile-server-latest/runtime/seahub.conf /shared/seafile/conf/seahub.conf
|
||||||
|
fi
|
||||||
|
rm -f /opt/seafile/seafile-server-latest/runtime/seahub.conf
|
||||||
|
ln -sf /shared/seafile/conf/seahub.conf /opt/seafile/seafile-server-latest/runtime/seahub.conf
|
Loading…
Reference in a new issue