Skip to content

Commit

Permalink
Fix to uninstall, Makefile, and a macro change. Add upstart-init.
Browse files Browse the repository at this point in the history
  • Loading branch information
John C. Frickson committed Apr 27, 2016
1 parent b029fa3 commit 13aa14b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
18 changes: 17 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build-aux/ax_nagios_get_paths
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions startup/upstart-init
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions uninstall.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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
;;
Expand Down

0 comments on commit 13aa14b

Please sign in to comment.