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

view net-analyzer/nrpe/files/nrpe.init @ 220:5fc6acd937e1

dev-vcs/kallithea: version bump to 0.3.6 (security update), masking <0.3.6
author Daniel Neugebauer <dneuge@energiequant.de>
date Sat, 29 Dec 2018 16:31:18 +0100
parents 90a7a9dbfafb
children
line wrap: on
line source

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