Fix Monitor::Control to handle local cameras
This commit is contained in:
parent
e8edeab641
commit
f683557b0e
|
@ -243,18 +243,24 @@ sub control {
|
||||||
|
|
||||||
if ($command eq 'stop' or $command eq 'restart') {
|
if ($command eq 'stop' or $command eq 'restart') {
|
||||||
if ($process) {
|
if ($process) {
|
||||||
`/usr/bin/zmdc.pl stop $process -m $$monitor{Id}`;
|
runCommand("zmdc.pl stop $process -m $$monitor{Id}");
|
||||||
} else {
|
} else {
|
||||||
`/usr/bin/zmdc.pl stop zma -m $$monitor{Id}`;
|
if ($monitor->{Type} eq 'Local') {
|
||||||
`/usr/bin/zmdc.pl stop zmc -m $$monitor{Id}`;
|
runCommand('zmdc.pl stop zmc -d '.$monitor->{Device});
|
||||||
|
} else {
|
||||||
|
runCommand('zmdc.pl stop zmc -m '.$monitor->{Id});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $command eq 'start' or $command eq 'restart' ) {
|
if ( $command eq 'start' or $command eq 'restart' ) {
|
||||||
if ( $process ) {
|
if ( $process ) {
|
||||||
`/usr/bin/zmdc.pl start $process -m $$monitor{Id}`;
|
runCommand("zmdc.pl start $process -m $$monitor{Id}");
|
||||||
} else {
|
} else {
|
||||||
`/usr/bin/zmdc.pl start zmc -m $$monitor{Id}`;
|
if ($monitor->{Type} eq 'Local') {
|
||||||
`/usr/bin/zmdc.pl start zma -m $$monitor{Id}`;
|
runCommand('zmdc.pl stop zmc -d '.$monitor->{Device});
|
||||||
|
} else {
|
||||||
|
runCommand('zmdc.pl stop zmc -m '.$monitor->{Id});
|
||||||
|
}
|
||||||
} # end if
|
} # end if
|
||||||
}
|
}
|
||||||
} # end sub control
|
} # end sub control
|
||||||
|
|
Loading…
Reference in New Issue