put back zmsystemctl.pl
parent
374123f9c2
commit
be26f14566
|
@ -149,21 +149,8 @@ if ( $command =~ /^(start|stop|restart)$/ ) {
|
||||||
$command = $1;
|
$command = $1;
|
||||||
|
|
||||||
if ( systemdRunning() && !calledBysystem() ) {
|
if ( systemdRunning() && !calledBysystem() ) {
|
||||||
Info("Redirecting command through systemctl");
|
qx(@BINDIR@/zmsystemctl.pl $command);
|
||||||
my $path = qx(which systemctl);
|
$command = '';
|
||||||
Info("Path is $path");
|
|
||||||
Info("Status is $?");
|
|
||||||
my $status = $? >> 8;
|
|
||||||
Info("Status is $status");
|
|
||||||
( $path ) = $path =~ /^(.*)$/;
|
|
||||||
|
|
||||||
if ( !$path || $status ) {
|
|
||||||
Fatal('Unable to determine systemctl executable. Is systemd in use?');
|
|
||||||
}
|
|
||||||
Info("exec $path $command zoneminder");
|
|
||||||
exec("$path $command zoneminder");
|
|
||||||
} else {
|
|
||||||
Debug("called by SystemD");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue