./F-startdaemons with Centos8

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
snapier3
Posts: 144
Joined: Tue Apr 23, 2019 7:12 pm

./F-startdaemons with Centos8

Post by snapier3 »

Couple of days ago in a development project I encountered an issue with NagiosXI install "F-startdaemons" script while testing on Centos8.

The install process will exit with a failure for the ntpd service restart.


Centos8 now handles ntp via chrony and the xi-sys.cfg still lists the dependency as

Code: Select all

ntpd="ntpd"
In the OEM Script

Code: Select all

#!/bin/bash -e

. ./xi-sys.cfg

# Was previous step completed?
if [ ! -f installed.importnagiosql ]; then
        echo "NagiosQL data was not imported - run previous script" >&2
        exit 1
fi

for svc in $httpd nagios npcd [color=#FF0000]$ntpd[/color] $crond; do
        if [ ! `command -v systemctl` ]; then
            service $svc restart
        else
            systemctl restart $svc
        fi
done

echo "Daemons started OK"
My workaround was to remove the call to $ntpd in the list of services to restart.

Code: Select all

#!/bin/bash -e

. ./xi-sys.cfg

# Was previous step completed?
if [ ! -f installed.importnagiosql ]; then
        echo "NagiosQL data was not imported - run previous script" >&2
        exit 1
fi

for svc in $httpd nagios npcd $crond; do
        if [ ! `command -v systemctl` ]; then
            service $svc restart
        else
            systemctl restart $svc
        fi
done

echo "Daemons started OK"
Removing this service from the list had no impact on the remaining steps in the install process nor the functionality of the NagiosXI.

--SN
Locked