megacoffee.net Gentoo overlay - legacy mirror
We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.
diff net-analyzer/nrpe/files/nrpe.init @ 54:90a7a9dbfafb
importing net-analyzer/nrpe-2.14 from official portage tree
author | Daniel Neugebauer <dneuge@energiequant.de> |
---|---|
date | Mon, 17 Mar 2014 16:09:30 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-analyzer/nrpe/files/nrpe.init Mon Mar 17 16:09:30 2014 +0100 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/files/nrpe.init,v 1.3 2013/01/25 17:43:36 flameeyes Exp $ + +: ${CFGFILE:=/etc/nagios/nrpe.cfg} + +get_config() { + [ -f ${CFGFILE} ] || return 1 + + sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' \ + ${CFGFILE} +} + +extra_started_commands="reload" + +command=/usr/libexec/${SVCNAME} +command_args="-c ${CFGFILE} --daemon" +pidfile=$(get_config pid_file) + +depend() { + config ${CFGFILE} +} + +reload() { + ebegin "Reloading ${SVCNAME}" + kill -HUP `cat ${pidfile}` + eend $? +}