Merge pull request #3450 from gonzalezcalleja/fix_zmpkg
Fix when using a custom state with zmpkg.pl
This commit is contained in:
commit
e943f0a411
|
@ -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