I am trying to get my set up to alternate the camera mode between mocord and modect, so that for 8 hours at night it records everything and during the day it cuts down to just recording events. I saved a 'daytime' and a 'nighttime' profile and set the jobs up in cron to do the switch per the ZM manual. It appears that when this is done via the script, the camera process 'breaks' because it shows the updated function type, but no recording will take place. I have to switch it from the current type, to monitor (not mocord or modect) and then back to mocord or modect to get it to start this function over again. Is there something I am missing with the automation process, or is this actually a bug?
O yeah, this server is Debian unstable, with ZM 1.23.2 installed from source with the bare minimum compile set (no fancy codecs or anything.)
Bug using zmpkg to adjust modes via cron
Update! I tested the script running as the www-data user (whom owns all the ZM info on my server,) and it appears to work fine. I am not sure if this is technically a bug, but in my opinion running zmpkg as root should either work or deny, not result in some unknown state. Regardless, it may be good to at least document.
To change states via crontab, start your command via sudo like
Code: Select all
sudo -u WwwDataUsername /usr/bin/zmpkg.pl YourSavedStateName