From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH v4] install initscript for NRPE Date: Wed, 09 May 2018 21:59:41 +0200 Message-ID: In-Reply-To: <6ff5c8f5a0375238a2a0fd310bce9eb339cf7316.camel@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2659929563403249383==" List-Id: --===============2659929563403249383== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Install initscript for NRPE addon. The second version of this patch actually includes the initscript, which was missing due to lack of coffee the first time. :-) Thanks to Michael for catching it. Resent due to crappy linewrapping in initscript by MUA. Signed-off-by: Peter Müller --- lfs/nagios_nrpe | 4 ++++ src/initscripts/packages/nrpe | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/initscripts/packages/nrpe diff --git a/lfs/nagios_nrpe b/lfs/nagios_nrpe index bebb80144..11ce2ae77 100644 --- a/lfs/nagios_nrpe +++ b/lfs/nagios_nrpe @@ -90,5 +90,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && make all $(MAKETUNING) cd $(DIR_APP) && make install cd $(DIR_APP) && make install-config + + # install initscript + $(call INSTALL_INITSCRIPT,nrpe) + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/initscripts/packages/nrpe b/src/initscripts/packages/nrpe new file mode 100644 index 000000000..8de798c06 --- /dev/null +++ b/src/initscripts/packages/nrpe @@ -0,0 +1,38 @@ +#!/bin/sh +# Begin $rc_base/init.d/nrpe + +. /etc/sysconfig/rc +. $rc_functions + +NRPEBIN=/usr/bin/nrpe +NRPECFG=/etc/nagios/nrpe.cfg + +case "$1" in + start) + boot_mesg "Starting nrpe..." + loadproc $NRPEBIN -c $NRPECFG -d + ;; + + stop) + boot_mesg "Stopping nrpe..." + killproc $NRPEBIN + rm -f /var/run/nrpe.pid + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc $NRPEBIN + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/nrpe -- 2.13.6 --===============2659929563403249383== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUVC Q2dBR0JRSmE4MU04QUFvSkVObEk4Zzk5ZTU5bzlIY1FBS3ljcXJIbllwM3FUOVhhUWxtV3p2NUEK bDlJaDQ0ZHZpcTMreEZIWlljUHFsZ0NlOElQcnZQejJIalZsSkY0enVpUkorSnpoQTFHNDVPT1JT bnErNVZoRwpSb0twcVVmdUh6T1NNMGxNRE9LSHFUZW15R2tYTXdoNVVzSjNTTW1zS2ZaTDV2NTNY N3pabmRuM0NuZG1iek55Ci9ieVFlazlZYXhlcVlwOHI5OGo3c0xkUG53NzY1OEFldzZXUXFpQjYv WWphWXZOeFFaa1RvNWJ5Q2JRMkgrQXYKbU5xcnlGRlR1NU52aXlJYmVGS1MyQVphWHpmWnFGV1RQ dzZCTHd1KzJHL1dBNmNpRkp0UXBSRkhwNUJkVnNabwpIdlVWZVJ2OGlJcXRvRTZqbVBGYUFaTFF5 b016LzNkSUdUWlhTOXJWVGg1NFZLSTRzUi9RTEZuVkNPcExDam1zCmpjWDJPSHJSM016anFCaFhq MEd6bGpCeVNkUDRxcEpTTERXOUZ5RXA1S0Z2MTVZNnlUcldRMUlyRmVjWDRDOE4KUGVHK1dxNk5M RGU5MHZ0anhFVXJobFdVRVUvaDcvV3lsQW9KUlZCMkg1RXF3bDhFR3JPYlpWL0F6Yng5RmQydgpZ TDdZUnFDMlp1NmZiTTlYV0R1ZnRNd3E2M09EVCtZcnhuQVZuNWc5T2VPNFBsLzdOMXd4ZVA4ZXF5 NDMvQ2doClMyTXlQVzEzM3BTSHZhNHpLeS8wUEZZOEswenpub3NzcG5yMU1FQXpvODJvVDFGUjJr ZlJFTnZsUmdMZ1FSQ3QKUWhiU1YrWm5IbHNKRUc5U1BxSHU1c3A3S2orMGRKakVWOEtuWXVuL1pk V21kUlBNQWNVOUt4b3Qwbnd5c1V6MApjZzVsbGxmU2ZibElMdFgvcUFxcAo9a0hLSQotLS0tLUVO RCBQR1AgU0lHTkFUVVJFLS0tLS0K --===============2659929563403249383==--