Problem changing run state from command line
Posted: Mon Sep 26, 2005 2:42 pm
Hello all,
I'm having some problems changing run state using the zmpkg.pl script from the command line. I am running ZoneMinder 1.21.3, installed from source (not ebuild), on a Gentoo Linux system. Changing run states from the web interface works fine, just not from the command line.
My cameras are set up with 2 run states: Day and Night. During the day, they are all set to monitor mode, and at night they are all set to modect. I use cron to change modes:
Assuming the cameras are not in the "Day" state, here's a few lines from zmpkg.log when I change run state to "Day" via the web interface:
But this is what happens when I try to change to the "Day" state from the command line (yes, my httpd user is apache):
After using the command line, the cameras' Function column in the web interface changes appropriately, but the cameras are still in the other mode (in this case modect). This is reflected in the fact that the Source column entries are still green, when if they were really in monitor mode they should change to yellow. The same behavior is observed in changing from Day to Night, the Function column turns to a green 'Modect', but the Source column remains yellow, and the cameras do not record events. Again, if I change the run state manually from the web interface everything works perfectly.
I haven't been able to make heads or tails of this problem, and have searched through the forums for a similar problem. I would appreciate any help (or a pointer to the relevent thread if this has been solved before).
-- John
I'm having some problems changing run state using the zmpkg.pl script from the command line. I am running ZoneMinder 1.21.3, installed from source (not ebuild), on a Gentoo Linux system. Changing run states from the web interface works fine, just not from the command line.
My cameras are set up with 2 run states: Day and Night. During the day, they are all set to monitor mode, and at night they are all set to modect. I use cron to change modes:
Code: Select all
0 20 * * * /usr/local/bin/zmpkg.pl Night
0 7 * * * /usr/local/bin/zmpkg.pl Day
Code: Select all
Command: state
Updating DB: Day
Executing: /usr/local/bin/zmdc.pl check
Executing: /usr/local/bin/zmdc.pl shutdown
Removing shared memory
Executing: /usr/local/bin/zmdc.pl check
Removing shared memory
Executing: /usr/local/bin/zmfix
Executing: /usr/local/bin/zmdc.pl status
Executing: /usr/local/bin/zmdc.pl start zmc -d 0
Executing: /usr/local/bin/zmdc.pl start zmc -d 1
Executing: /usr/local/bin/zmdc.pl start zmc -d 2
Executing: /usr/local/bin/zmdc.pl start zmc -d 3
Executing: /usr/local/bin/zmdc.pl start zmfilter.pl
Executing: /usr/local/bin/zmdc.pl start zmaudit.pl -d 900 -y
Executing: /usr/local/bin/zmdc.pl start zmwatch.pl
Executing: /usr/local/bin/zmdc.pl start zmupdate.pl -c
Code: Select all
Command: state
Updating DB: Day
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl check'
Executing: su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl check'
I haven't been able to make heads or tails of this problem, and have searched through the forums for a similar problem. I would appreciate any help (or a pointer to the relevent thread if this has been solved before).
-- John