Merge branch 'ent-7100-bug-en-instalacion-de-servicio-systemctl-agente' into 'develop'

changed systemctl check for command -v

See merge request artica/pandorafms!3983
This commit is contained in:
Daniel Rodriguez 2021-04-12 10:38:57 +00:00
commit d96dd76b26
1 changed files with 2 additions and 2 deletions

View File

@ -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"