We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

comparison 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
comparison
equal deleted inserted replaced
53:5cc622037103 54:90a7a9dbfafb
1 #!/sbin/runscript
2 # Copyright 1999-2013 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/files/nrpe.init,v 1.3 2013/01/25 17:43:36 flameeyes Exp $
5
6 : ${CFGFILE:=/etc/nagios/nrpe.cfg}
7
8 get_config() {
9 [ -f ${CFGFILE} ] || return 1
10
11 sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' \
12 ${CFGFILE}
13 }
14
15 extra_started_commands="reload"
16
17 command=/usr/libexec/${SVCNAME}
18 command_args="-c ${CFGFILE} --daemon"
19 pidfile=$(get_config pid_file)
20
21 depend() {
22 config ${CFGFILE}
23 }
24
25 reload() {
26 ebegin "Reloading ${SVCNAME}"
27 kill -HUP `cat ${pidfile}`
28 eend $?
29 }