When I try to stop or restart seahub (seafile-server-12.0.14), I get this every time:
$ ./seahub.sh stop
Stopping seahub …
Failed to stop seahub.
$ echo $?
1
This is the function in seahub.sh that fails:
function stop_seahub () {
if [[ -f ${pidfile} ]]; then
echo “Stopping seahub …”
pkill -f “thirdpart/bin/gunicorn”
sleep 1
if pgrep -f “thirdpart/bin/gunicorn” 2>/dev/null 1>&2 ; then
echo ‘Failed to stop seahub.’
exit 1
fi
rm -f ${pidfile}
return 0
else
echo “Seahub is not running”
fi
}
Replacing sleep 1 by sleep 2 fixes the problem. A more robust mechanism, e.g. checking every second for a few seconds, would be even better.
Where should I report this? I am not a seafile developer.