add logger function

This commit is contained in:
Gerrit Gogel 2021-02-01 18:16:43 +01:00
parent 774ba43d4b
commit 33ba46315a
2 changed files with 7 additions and 0 deletions

View file

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
source /scripts/utils.sh source /scripts/utils.sh
trap 'sigterm' SIGTERM
gc_cron & gc_cron &
start_server & start_server &
start_socat & start_socat &
logger &
keep_running keep_running

View file

@ -38,6 +38,11 @@ function gc_cron {
service cron start service cron start
fi fi
} }
function logger {
tail -f /opt/seafile/logs/common.log | tee /proc/1/fd/1
}
function keep_running { function keep_running {
while true; do while true; do
tail -f /dev/null & wait ${!} tail -f /dev/null & wait ${!}