Page 1 of 1

/etc/init.d/nagiosxi

Posted: Tue Aug 29, 2017 1:13 pm
by onegative
Nagios Support,

This is a fresh install of 5.4.7 on RHEL7.
Can anyone explain what this startup script does exactly?
I do not see the purpose for it, why does it exist?
Looking through it everything is basically commented out other than a few times to set the RETVAL variable based on passed argument.

Let me know and thanks,
Danny

Code: Select all

#!/bin/sh
#
# chkconfig: 345 99 01
# description: NagiosXI subtasks
#
# $Id: nagiosxi,v 1.4 2010/06/14 13:33:48 root Exp $
#

PATH=PATH:/usr/local/bin/
stdserv="sysstat cmdsubsys eventman feedproc nom cleaner reportengine"

# See how we were called.
case "$1" in
        start)
                # Most scripts run frequently
                RETVAL=0
                #for ech in $stdserv; do true
                #       daemon -n $ech -r -u nagios.nagios -a 45 -o /usr/local/nagiosxi/var/${ech}.log -- /usr/bin/php -q /usr/local/nagiosxi/cron/${ech}.php
                #       RETVAL=$(( RETVAL || $? ))
                #done

                # DB maint runs a bit differently
                #daemon -n dbmaint -r -u nagios.nagios -A 1 -L $(( 60 * 5 )) -o /usr/local/nagiosxi/var/dbmaint.log --                  /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php
                #RETVAL=$(( RETVAL || $? ))

                # Recurring downtime script

                ;;
        stop)
                RETVAL=0
                #for ech in $stdserv dbmaint; do true
                #       daemon -n $ech -r --stop -u nagios.nagios
                #       RETVAL=$(( RETVAL || $? ))
                #done
                ;;
        restart)
                RETVAL=0
                ;;
        status)
                RETVAL=0
                #for ech in $stdserv dbmaint; do true
                #       daemon -n $ech -r --running -u nagios.nagios
                #       RETVAL=$(( RETVAL || $? ))
                #done
                ;;
        *)
                echo "Usage: $0 {start|stop|restart|status}"
                RETVAL=1
                ;;
esac
exit $RETVAL

Re: /etc/init.d/nagiosxi

Posted: Tue Aug 29, 2017 1:22 pm
by scottwilkerson
It doesn't do anything and is a relic of the past.

I will coordinate with the development team to have it removed from the install at some point in future versions.