stop / start socat in gc.sh

This commit is contained in:
Gerrit Gogel 2021-02-01 14:17:29 +01:00
parent 8b658bd755
commit e9771dcb83

View file

@ -1,9 +1,11 @@
#!/bin/bash
set -e
source /scripts/utils.sh
SEAFILE_DIR=/opt/seafile/seafile-server-latest
if [[ $SEAFILE_SERVER != *"pro"* ]]; then
echo "Seafile CE: Stop Seafile to perform offline garbage collection."
stop_socat
$SEAFILE_DIR/seafile.sh stop
echo "Waiting for the server to shut down properly..."
sleep 5
@ -18,8 +20,9 @@ fi
) gc_exit_code=$?
if [[ $SEAFILE_SERVER != *"pro"* ]]; then
echo "Giving the server some time..."
echo "Seafile CE: Offline garbage collection completed. Starting Seafile."
sleep 3
$SEAFILE_DIR/seafile.sh start
start_socat
fi
exit $gc_exit_code