From 91d5d0c96d729a2a230b8e0d111201d97a294045 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 30 Mar 2021 14:17:45 +0200 Subject: [PATCH] changed systemctl check for command -v --- pandora_agents/unix/pandora_agent_installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index ef9b1bdf5b..e2e08b0e9d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -166,7 +166,7 @@ uninstall () { rm -f $DESTDIR/etc/newsyslog.d/pandora_agent.conf # Remove systemd service if exists - if [ `systemctl --v 2> /dev/null | grep systemd | wc -l` != 0 ] + if [ `command -v systemctl` ] then PANDORA_AGENT_SERVICE="/etc/systemd/system/pandora_agent_daemon.service" rm -f $PANDORA_AGENT_SERVICE @@ -482,7 +482,7 @@ install () { fi # Create systemd service - if [ `systemctl --v 2> /dev/null | grep systemd | wc -l` != 0 ] + if [ `command -v systemctl` ] then echo "Creating systemd service for pandora_agent_daemon"