Browse Source

Fix to uninstall, Makefile, and a macro change. Add upstart-init.

John C. Frickson 9 years ago
parent
commit
13aa14bd8f
5 changed files with 41 additions and 5 deletions
  1. 17 1
      Makefile.in
  2. 1 1
      build-aux/ax_nagios_get_paths
  3. 1 1
      configure
  4. 20 0
      startup/upstart-init
  5. 2 2
      uninstall.in

+ 17 - 1
Makefile.in

@@ -34,6 +34,22 @@ SRC_INETD=@src_inetd@
 SRC_INIT=@src_init@
 
 
+default:
+	@echo
+	@echo Please enter 'make [option]' where [option] is one of:
+	@echo
+	@echo "     all              builds nrpe and check_nrpe"
+	@echo "     nrpe             builds nrpe only"
+	@echo "     check_nrpe       builds check_nrpe only"
+	@echo "     install          install nrpe and check_nrpe"
+	@echo "     install-plugin   install the check_nrpe plugin"
+	@echo "     install-daemon   install the nrpe daemon"
+	@echo "     install-config   install the nrpe configuration file"
+	@echo "     install-inetd    install the startup files for inetd, launchd, etc."
+	@echo "     install-init     install the startup files for init, systemd, etc."
+	@echo "     solaris-package  create the solaris package"
+	@echo
+
 all:
 	cd $(SRC_BASE); $(MAKE)
 
@@ -105,7 +121,7 @@ distclean: clean
 	cd $(SRC_BASE); $(MAKE) $@; cd ..
 	cd package/solaris; $(MAKE) $@; cd ../..
 	rm -rf autom4te.cache
-	rm -f config.log config.status config.cache sample-config/nrpe.cfg $(SRC_INCLUDE)/config.h 
+	rm -f config.log config.status config.cache sample-config/nrpe.cfg $(SRC_INCLUDE)/config.h
 	rm -f startup/bsd-init startup/debian-init startup/default-init startup/default-inetd
 	rm -f startup/default-service startup/default-xinetd startup/mac-org.nagios.PKG_NAME.plist
 	rm -f startup/openrc-conf startup/openrc-init startup/solaris-PKG_NAME.xml

+ 1 - 1
build-aux/ax_nagios_get_paths

@@ -263,7 +263,7 @@ fi
 
 if test x"$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi
 
-tmpfilesd=${tmpfilesd="/var/lib/tmpfiles.d"}
+tmpfilesd=${tmpfilesd="/usr/lib/tmpfiles.d"}
 if test ! -d "$tmpfilesd"; then
 	tmpfilesd="N/A"
 else

+ 1 - 1
configure

@@ -3321,7 +3321,7 @@ fi
 
 if test x"$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi
 
-tmpfilesd=${tmpfilesd="/var/lib/tmpfiles.d"}
+tmpfilesd=${tmpfilesd="/usr/lib/tmpfiles.d"}
 if test ! -d "$tmpfilesd"; then
 	tmpfilesd="N/A"
 else

+ 20 - 0
startup/upstart-init

@@ -0,0 +1,20 @@
+# nrpe - the Nagios Remote Plugin Executor
+#
+# nrpe is a program that runs plugins on this host
+# and reports the results back to a nagios server
+#
+# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
+
+description		"the Nagios Remote Plugin Executor"
+
+oom score -800
+setgid nagios
+setuid nagios
+
+start on (local-filesystems and net-device-up IFACE!=lo)
+stop on runlevel [!2345]
+
+expect daemon
+respawn
+
+exec /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f

+ 2 - 2
uninstall.in

@@ -140,7 +140,7 @@ rm_startup () {
 		else
 			if test "$INETD_TYPE" != xinetd; then
 				prt_msg 0 1 "Stop and disable $NAME" && {
-					case "$INETD_TYPE in
+					case "$INETD_TYPE" in
 					systemd)
 						systemctl stop $NAME; systemctl disable $NAME
 						;;
@@ -170,7 +170,7 @@ rm_startup () {
 
 	if test "$SRC_INIT" != unknown; then
 		prt_msg 0 1 "Stop and disable $NAME" && {
-			case "$INIT_TYPE in
+			case "$INIT_TYPE" in
 			systemd)
 				systemctl stop $NAME; systemctl disable $NAME
 				;;