I have problem with nagios4 on debian 10.9 than is very slow to stop (and restart).
# date ; systemctl stop nagios4 ; date
Tue Aug 24 09:13:04 CEST 2021
Tue Aug 24 09:13:19 CEST 2021
#
=> 15 seconds
After debug, I think I have found an error in the call to "killproc" than need progname as parameter to work.
--- /etc/init.d/nagios4.orig 2021-08-18 01:59:17.172227277 +0200
+++ /etc/init.d/nagios4 2021-08-18 01:58:27.017586384 +0200
@@ -146,7 +146,7 @@
}
stop () {
- killproc -p $THEPIDFILE
+ killproc -p $THEPIDFILE $NAME
ret=$?
if [ `pidof nagios4 | wc -l ` -gt 0 ]; then
echo -n "Waiting for $NAME daemon to die.."
Regards
Benoit