Skip to content

debian: Fix init script to stop daemon properly

Sunil Mohan Adapa requested to merge sunilmohan/mldonkey:fix-stop-daemon into master

Current init script fails to stop the daemon properly. This is because start-stop-daemon is asked to stop based only on the PID file which is owned by non-root user. Making the process match more specific fixes the problem.

# start-stop-daemon --stop --pidfile /var/run/mldonkey/mlnet.pid
start-stop-daemon: matching only on non-root pidfile /var/run/mldonkey/mlnet.pid is insecure
# echo $?
2
# start-stop-daemon --stop --pidfile /var/run/mldonkey/mlnet.pid --exec /usr/bin/mlnet
# echo $?
0

Signed-off-by: Sunil Mohan Adapa sunil@medhas.org

Merge request reports

Loading