use sigkill in cron gc

This commit is contained in:
Gerrit Gogel 2023-02-26 12:23:53 +01:00
parent 1d52e406b2
commit e9d8f384ae
2 changed files with 14 additions and 1 deletions

View file

@ -7,7 +7,9 @@ if [[ $SEAFILE_SERVER != *"pro"* ]]; then
stop_socat
$SEAFILE_DIR/seafile.sh stop
echo "Waiting for the server to shut down properly..."
sleep 5
sleep 30
echo "Kill remaining processes with SIGKILL signal."
sig_kill_all
else
echo "Seafile Pro: Perform online garbage collection."
fi

View file

@ -47,4 +47,15 @@ function keep_running {
while true; do
tail -f /dev/null & wait ${!}
done
}
function sig_kill_all () {
pkill -SIGKILL -f "seaf-server -c ${default_ccnet_conf_dir}"
pkill -SIGKILL -f "fileserver -c ${default_ccnet_conf_dir}"
pkill -SIGKILL -f "seafevents.main"
pkill -SIGKILL -f "convert_server.py"
pkill -SIGKILL -f "soffice.*--invisible --nocrashreport"
pkill -SIGKILL -f "wsgidav.server.server_cli"
pkill -SIGKILL -f "notification-server -c ${central_config_dir}"
pkill -SIGKILL -f "seafile-monitor.sh"
}