#!/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 $? }