blob: fc980ad39bc1b66dd804d512f812e36a6eb610f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/files/munin-node_init.d_2.0.5,v 1.4 2012/09/16 16:12:31 flameeyes Exp $
get_munin_config() {
awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
}
: ${CFGFILE:=/etc/munin/munin-node.conf}
command=/usr/sbin/munin-node
command_args="--config ${CFGFILE}"
pidfile=$(get_munin_config pid_file)
start_stop_daemon_args="--nicelevel ${NICE_LEVEL:-0}"
extra_started_commands="reload"
depend() {
config "$CFGFILE"
need net
before cron
[ "$(get_munin_config log_file)" == "Sys::Syslog" ] && \
use logger
}
start_pre() {
checkpath -d $(dirname ${pidfile})
}
reload() {
ebegin "Reloading ${SERVICE}"
kill -HUP `cat ${pidfile}`
eend $?
}
# vim: filetype=gentoo-init-d:
|