From 8eab4ddb7975f20234a800d66dc5b29e8f93e21d Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 4 Sep 2020 15:10:27 +0200 Subject: [PATCH] updated redhat server spec --- pandora_server/pandora_server.redhat.spec | 24 ++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c92b375d4f..164554b260 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -110,8 +110,10 @@ exit 0 %post # Initial installation -if [ "$1" = 1 ]; then - if [ `command -v systemctl` ]; +# Run when not uninstalling +if [ "$1" -ge 1 ] +then + if [ `command -v systemctl` ] then echo "Copying new version for tentacle_serverd service" cp -f /usr/share/pandora_server/util/tentacle_serverd.service /usr/lib/systemd/system/ @@ -123,19 +125,19 @@ if [ "$1" = 1 ]; then /sbin/chkconfig tentacle_serverd on fi -/sbin/chkconfig --add pandora_server -/sbin/chkconfig pandora_server on + /sbin/chkconfig --add pandora_server + /sbin/chkconfig pandora_server on -systemctl enable pandora_server.service + systemctl enable pandora_server.service - echo "Pandora FMS Server configuration is %{_sysconfdir}/pandora/pandora_server.conf" - echo "Pandora FMS Server main directory is %{prefix}/pandora_server/" - echo "The manual can be reached at: man pandora or man pandora_server" - echo "Pandora FMS Documentation is in: http://pandorafms.org" - echo " " + echo "Pandora FMS Server configuration is %{_sysconfdir}/pandora/pandora_server.conf" + echo "Pandora FMS Server main directory is %{prefix}/pandora_server/" + echo "The manual can be reached at: man pandora or man pandora_server" + echo "Pandora FMS Documentation is in: http://pandorafms.org" + echo " " fi -# This will avoid confi files overwritting on UPGRADES. +# This will avoid config files overwritting on UPGRADES. # Main configuration file if [ ! -e "/etc/pandora/pandora_server.conf" ] then