Added systemd and sysvinit startup for pandora_agent_daemon

This commit is contained in:
Enrique Martin 2023-07-19 10:46:10 +02:00
parent e645f65e8e
commit a9ae04cdc4
1 changed files with 11 additions and 2 deletions

View File

@ -541,8 +541,17 @@ install () {
then
echo "Define 'pandora_agent=\"YES\"' in /etc/rc.conf to enable the daemon."
else
echo "Check your startup configuration to be sure Pandora FMS Agent is ready "
echo "to start automatically when system restarts":
# Enable startup service
if [ `command -v systemctl` ]
then
systemctl enable pandora_agent_daemon
elif [ `command -v chkconfig` ]
then
chkconfig pandora_agent_daemon on
else
echo "Check your startup configuration to be sure Pandora FMS Agent is ready "
echo "to start automatically when system restarts":
fi
fi
# Restore the daemon script