put back zmsystemctl.pl

This commit is contained in:
Isaac Connor 2018-06-08 14:59:14 -04:00
parent 374123f9c2
commit be26f14566
1 changed files with 2 additions and 15 deletions

View File

@ -149,21 +149,8 @@ if ( $command =~ /^(start|stop|restart)$/ ) {
$command = $1;
if ( systemdRunning() && !calledBysystem() ) {
Info("Redirecting command through systemctl");
my $path = qx(which systemctl);
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");
qx(@BINDIR@/zmsystemctl.pl $command);
$command = '';
}
}