mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2025-02-22 21:12:16 +00:00
Merge pull request #73 from shoeper/fix/71
gc.sh: only stop Seafile when not using Seafile Pro
This commit is contained in:
commit
a4538a06bc
|
@ -5,10 +5,15 @@ set -e
|
||||||
# Before
|
# Before
|
||||||
SEAFILE_DIR=/opt/seafile/seafile-server-latest
|
SEAFILE_DIR=/opt/seafile/seafile-server-latest
|
||||||
|
|
||||||
|
if [[ $SEAFILE_SERVER != *"pro"* ]]; then
|
||||||
|
echo "Seafile CE: Stop Seafile to perform offline garbage collection."
|
||||||
$SEAFILE_DIR/seafile.sh stop
|
$SEAFILE_DIR/seafile.sh stop
|
||||||
|
|
||||||
echo "Waiting for the server to shut down properly..."
|
echo "Waiting for the server to shut down properly..."
|
||||||
sleep 5
|
sleep 5
|
||||||
|
else
|
||||||
|
echo "Seafile Pro: Perform online garbage collection."
|
||||||
|
fi
|
||||||
|
|
||||||
# Do it
|
# Do it
|
||||||
(
|
(
|
||||||
|
@ -22,9 +27,11 @@ gc_exit_code=$?
|
||||||
|
|
||||||
# After
|
# After
|
||||||
|
|
||||||
|
if [[ $SEAFILE_SERVER != *"pro"* ]]; then
|
||||||
echo "Giving the server some time..."
|
echo "Giving the server some time..."
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
$SEAFILE_DIR/seafile.sh start
|
$SEAFILE_DIR/seafile.sh start
|
||||||
|
fi
|
||||||
|
|
||||||
exit $gc_exit_code
|
exit $gc_exit_code
|
||||||
|
|
Loading…
Reference in a new issue