Fix when using a custom state
This commit is contained in:
parent
05b5ca9b15
commit
858ab62fc4
|
@ -60,7 +60,7 @@ my $dbh = zmDbConnect();
|
||||||
Debug("Command: $command");
|
Debug("Command: $command");
|
||||||
if ( $command and ( $command !~ /^(?:start|stop|restart|status|logrot|version)$/ ) ) {
|
if ( $command and ( $command !~ /^(?:start|stop|restart|status|logrot|version)$/ ) ) {
|
||||||
# Check to see if it's a valid run state
|
# Check to see if it's a valid run state
|
||||||
if ($state = ZoneMinder->find_one(Name=>$command)) {
|
if ($state = ZoneMinder::State->find_one(Name=>$command)) {
|
||||||
$state->{Definitions} = [];
|
$state->{Definitions} = [];
|
||||||
foreach (split(',', $state->{Definition})) {
|
foreach (split(',', $state->{Definition})) {
|
||||||
my @state = split(':', $_);
|
my @state = split(':', $_);
|
||||||
|
|
Loading…
Reference in New Issue