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 v3] install initscript for NRPE Date: Mon, 07 May 2018 16:56:49 +0200 Message-ID: <2d554bc9-64f6-e1dd-d342-41ebe8a7d57e@link38.eu> In-Reply-To: <7a4bc1ce-d0b1-edd0-06b0-55ae96bb3530@link38.eu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5431010887288812733==" List-Id: --===============5431010887288812733== 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..af37f5076 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 initscripts + $(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..cd87c1703 --- /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 --===============5431010887288812733== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUVC Q2dBR0JRSmE4R2s1QUFvSkVObEk4Zzk5ZTU5b2FTQVFBS0xaNHVjVHB3UzVaOXV1WGxOREJJblMK ekxmMStoQ2l6ZWVRQjkranNuOXpQT0FrUWVENEp0M2xnT1FkWHk3TXJQY0RjWkU1YzBqMkJ0SlNN TS8xWEdoMAozTnZidkJkZTRGWGVJSUN0Z1gzL2ZZZmpOcDV2VTRYQldidE1ZQTJ4ZlFuQW8yck56 dmFsc0JML005WW4xbzU3CkwwRkRxYnR3QU1pK0hreVFXOUxab0lXRlcrYkVxeFZGNUpybE9xVzJZ bXFyRFh5RWpPZ2drbzgwM2ZvQ1llY1YKelA5UTlQa0padm5zaExkT1ZLdTB0ZysraGdCOVRXQ2Yv L2FlWFVlaHNpck1OUldxZE43SFhoaitrVWliei82VApITjhTeGJiMlA1ajFTRUVUc1hVQmtiY3BI bCtwMjhmY3lXZGx3UkdFYnZIdHFwSkhaOTZzYit6WTBKTDhHc2xaCkU0R3Z6TCtSc2RXeHZ2NExM QnR2VWkzS1owem1NM2p2R3Z4VVFFelpFdndQL2hSYXNUUGRNMWdSSXNwV3NoaGMKUkZrYityNUlu ZUptMFVFNWxGRDhBZUZ3RHROcWpWRHkxRmYvTlpzZnpGVVErZmg0cXQ3UU9GTWZZalp1TzgrZgpO ajlZM2JkTmE0SDB5MjZSem1NQUZ3K1pNTjRzUVl5MW9UN3lPTTA3MTFKbGJwYktIR0lMRktMVHVw anBsNmpzCldtckZ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