/etc/init.d/nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
onegative
Posts: 175
Joined: Tue Feb 17, 2015 12:06 pm

/etc/init.d/nagiosxi

Post 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
Last edited by onegative on Tue Aug 29, 2017 1:34 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: /etc/init.d/nagiosxi

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked