seafile-containerized/seafile-server/scripts/start.sh
Gerrit Gogel 2a176d2d12 seafile-server: improved lifecycle management and scheduled gc
Exits container if seafile-server or socat exits. Exits the container after scheduled garbage collection. These changes allow a clean restart with deterministic behaviour. It is recommended to set the restart policy for the container to "unless-stopped".
2024-02-14 11:05:59 +01:00

19 lines
198 B
Bash

#!/bin/bash
source /scripts/utils.sh
trap 'sigterm' SIGTERM
rm -f /tmp/gc_active
gc_cron
start_server &
start_socat &
logger &
wait -n
while [ -f /tmp/gc_active ]; do
sleep 10
done
exit $?