Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "How would you like to configure the NRPE daemon?"
- select DMN in 'Xinetd' 'Standalone Daemon'; do
- if [ "$DMN" = "Xinetd" ];
- then
- DMNMODE="xinetd"
- if [ -e $XINETDSVC ]; then
- cat << EOF > $XINETDFILE
- service nrpe
- {
- flags = REUSE
- type = UNLISTED
- port = $NRPEPORT
- socket_type = stream
- wait = no
- user = $NGUSER
- group = $NGGROUP
- server = /usr/sbin/nrpe
- server_args = -c $NRPECFG --inetd
- log_on_failure += USERID
- disable = no
- only_from = 127.0.0.1 $NAGIOSSRV
- }
- EOF
- $XINETDSVC restart
- else
- echo "Xinetd is not installed!"
- break
- fi
- break
- elif [ "$DMN" = "Standalone Daemon" ];
- then
- DMNMODE="daemon"
- chkconfig nrpe on ; $NRPESVC start
- break
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement