From patchwork Tue May 8 00:34:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 1757 Return-Path: Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id B3EF860D14 for ; Mon, 7 May 2018 16:34:47 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 0E65C10071C8; Mon, 7 May 2018 15:34:47 +0100 (BST) Authentication-Results: mail01.i.ipfire.org; dkim=pass header.d=link38.eu; dmarc=pass (policy=none) header.from=link38.eu; spf=pass smtp.mailfrom=peter.mueller@link38.eu Received: from mx-nbg.link38.eu (mx-nbg.link38.eu [IPv6:2a03:4000:6:432c:1f9e:48:ac3:199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx-nbg.link38.eu", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 3B6F810F5EBB for ; Mon, 7 May 2018 15:34:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=link38.eu; s=201803; t=1525703682; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lzxA5lKylllxsR6AiL7q1H6rjs5+wBu96vheA+giax0=; b=W1iM/Obc/BOPSsyErpx2OJGoWXZNO2/rVBmb66MJR0IkPkeoDKkxDtzvOkWJ0s8v0NKRdg dc90NM046zCSlaIoreI32LFc0W0j4tHgqcsdsNxDWdXNjpIJGd5h6JV5vcTe8pI7h3vN6e J+HtUh4ItyoJl0wq6KvexunXTTPqhLYplJkAE3UiSdKZn2s1Z/1QvbrVlp9GK6UNwxm2Yn RqrS4HA0V8gYO2HETjdrIaUz+hp1s+3hLjAuCWtmgRgZReB1pla6uGAhEJsrvGsZ0W18q0 e5RNcOhsJnp/v0YSR1SPVjOkqAqXBdUmTYdhzXFpR0oB+D19xV/wP7CpLhs69w== Subject: [PATCH v2] install initscript for NRPE To: Michael Tremer , "IPFire: Development-List" References: From: =?utf-8?q?Peter_M=C3=BCller?= Openpgp: preference=signencrypt Message-ID: <7a4bc1ce-d0b1-edd0-06b0-55ae96bb3530@link38.eu> Date: Mon, 7 May 2018 16:34:31 +0200 MIME-Version: 1.0 In-Reply-To: X-Spamd-Result: default: False [-11.63 / 11.00]; ASN(0.00)[asn:197540, ipnet:2a03:4000::/32, country:DE]; DKIM_TRACE(0.00)[link38.eu:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a03:4000:6:432c:1f9e:48:ac3:199]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; HAS_ATTACHMENT(0.00)[]; DMARC_POLICY_ALLOW(-0.25)[link38.eu,none]; IP_SCORE(-3.77)[ip: (-9.88), ipnet: 2a03:4000::/32(-4.94), asn: 197540(-3.96), country: DE(-0.09)]; MX_GOOD(-0.01)[cached: mx-nbg.link38.eu]; RCVD_COUNT_ZERO(0.00)[0]; BAYES_HAM(-3.00)[100.00%]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; R_DKIM_ALLOW(-0.20)[link38.eu]; REPLY(-2.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-2.00)[9.9.1.0.3.c.a.0.8.4.0.0.e.9.f.1.c.2.3.4.6.0.0.0.0.0.0.4.3.0.a.2.list.dnswl.org : 127.0.6.2] X-Spam-Status: No, score=-11.63 X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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. 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 + ;; + + 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 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