Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. echo "How would you like to configure the NRPE daemon?"
  2. select DMN in 'Xinetd' 'Standalone Daemon'; do
  3. if [ "$DMN" = "Xinetd" ];
  4. then
  5. DMNMODE="xinetd"
  6. if [ -e $XINETDSVC ]; then
  7. cat << EOF > $XINETDFILE
  8. service nrpe
  9. {
  10. flags = REUSE
  11. type = UNLISTED
  12. port = $NRPEPORT
  13. socket_type = stream
  14. wait = no
  15. user = $NGUSER
  16. group = $NGGROUP
  17. server = /usr/sbin/nrpe
  18. server_args = -c $NRPECFG --inetd
  19. log_on_failure += USERID
  20. disable = no
  21. only_from = 127.0.0.1 $NAGIOSSRV
  22. }
  23. EOF
  24. $XINETDSVC restart
  25. else
  26. echo "Xinetd is not installed!"
  27. break
  28. fi
  29. break
  30. elif [ "$DMN" = "Standalone Daemon" ];
  31. then
  32. DMNMODE="daemon"
  33. chkconfig nrpe on ; $NRPESVC start
  34. break
  35. fi
  36. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement