From be26f14566e05edc2bcd0107ab53190e81ec60dd Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 8 Jun 2018 14:59:14 -0400 Subject: [PATCH] put back zmsystemctl.pl --- scripts/zmpkg.pl.in | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/scripts/zmpkg.pl.in b/scripts/zmpkg.pl.in index e146f76c8..d11e04d5a 100644 --- a/scripts/zmpkg.pl.in +++ b/scripts/zmpkg.pl.in @@ -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 = ''; } }