Open eRaid6 opened 2 years ago
For now you could try adding multiple comamnds in .service file
ExecReload=/usr/bin/zmdc.pl 'stop zmeventnotification.pl'; sleep 2; /usr/bin/zmpkg.pl restart
Other option is write a shell script that does the above commands but checks to see if zmeventnotification is installed/enabled first.
ExecReload=/usr/bin/my_zm_restarter.sh
I wrote a script that I run out of cron every minute that checks for the condition and then kills zmeventnotification.pl
$ cat /usr/local/bin/kill-zmeventnotification.sh
#!/usr/bin/env bash
# zmeventnotification.pl hangs when zoneminder is trying to restart
# to work around this, we will look for the systemctl command to
# restart zoneminder, and if it exists then we will pkill the event
# notification server
# https://github.com/ZoneMinder/zmeventnotification/issues/417
if pgrep -f 'systemctl restart zoneminder'; then
pkill -9 -f 'zmeventnotification.pl'
fi
Event Server version
Hooks version (if you are using Object Detection)
The version of ZoneMinder you are using: 1.36.20
OS version: Ubuntu 20.04.4 LTS
What is the nature of your issue Bug
Details When
zoneminder
is told to restart via systemd,zmeventnotification.pl
does not exit which causes Zoneminder restart to timeout. During this time if you manually kill zmeventnotification.pl then Zoneminder will restart successfully. Looks to be the same issue this person on the Zoneminder forums reported https://forums.zoneminder.com/viewtopic.php?t=30555.Debug Logs (if applicable)