diff --git a/seafile-server/scripts/start.sh b/seafile-server/scripts/start.sh index 7805453..561be8e 100644 --- a/seafile-server/scripts/start.sh +++ b/seafile-server/scripts/start.sh @@ -1,8 +1,10 @@ #!/bin/bash source /scripts/utils.sh +trap 'sigterm' SIGTERM gc_cron & start_server & start_socat & +logger & keep_running \ No newline at end of file diff --git a/seafile-server/scripts/utils.sh b/seafile-server/scripts/utils.sh index 9846ae0..f32cb2a 100644 --- a/seafile-server/scripts/utils.sh +++ b/seafile-server/scripts/utils.sh @@ -38,6 +38,11 @@ function gc_cron { service cron start fi } + +function logger { + tail -f /opt/seafile/logs/common.log | tee /proc/1/fd/1 +} + function keep_running { while true; do tail -f /dev/null & wait ${!}