[csw-users] NRPE SMF stop/restart methods.

Will McDonald wmcdonald at gmail.com
Thu Jul 26 15:47:47 CEST 2007


Hi,

I've just been setting up CSWnrpe 2.8.1,REV=2007.06.02 from Stable on
a Solaris 10 box and ran in to a minor problem, I don't know if it's
worth of a bug report but I'll post it for the archives anyway.

In /opt/csw/lib/svc/method/svc-nrpe the stop/restart case statements use:

`pgrep -x -u 0,1,146 nrpe`

to locate nrpe's PID, unfortunately this system had already had Nagios
built from source in the past and as such already had a 'nagios' user
with a different UID, breaking the stop/restart methods.

I don't know if it's outside of your packaging standards but something like:

NRPE_USER=`awk -F'=' '/nrpe_user/ { print $NF }' $CONFIG_FILE`

'restart')
        [ -n "`pgrep -x -u 0,1,$NRPE_USER nrpe`" ] && kill -TERM
`pgrep -x -u 0,1,nagios nrpe`
        if [ -f $CONFIG_FILE ]; then
            wait 1
            $BIN_FILE -c $CONFIG_FILE -d
        fi
        ;;

--
Will.



More information about the users mailing list