changed systemctl check for command -v
This commit is contained in:
parent
8a62fa67ad
commit
91d5d0c96d
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue