From 048153101214b5daa9f5b717f1b2bf9d3d1c93e6 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Sun, 28 Apr 2013 19:01:08 -0700
Subject: [PATCH 7/8] Add condrestart/try-restart target to initscript
The spec file calls this in %postun. It simply fails but the error
output is eaten by the redirection to /dev/null.
---
init-script.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/init-script.in b/init-script.in
index ed6c366..96e17a7 100644
--- a/init-script.in
+++ b/init-script.in
@@ -66,12 +66,17 @@ case "$1" in
RETVAL=$?
echo
;;
+ condrestart|try-restart)
+ status nrpe >/dev/null 2>&1 || exit 0
+ $0 stop
+ $0 start
+ ;;
status)
status nrpe
RETVAL=$?
;;
*)
- echo "Usage: nrpe {start|stop|restart|reload|status}"
+ echo "Usage: nrpe {start|stop|restart|reload|condrestart|status}"
RETVAL=2
esac
--
1.8.3.1