blob: 5853c54c5100fdd53d5a512bbaf20864cf54c310 (
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
|
#!/sbin/runscript
# Copyright 1999-2011 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_1.4.5-r3,v 1.2 2011/04/03 22:15:50 flameeyes Exp $
[ -z "${NAME}" ] && NAME="munin-node"
[ -z "${PIDFILE}" ] && PIDFILE=/var/run/munin/$NAME.pid
depend() {
need net
before cron
}
start() {
local piddir=$(dirname ${PIDFILE})
[ -d ${piddir} ] || mkdir -p ${piddir}
NICE_LEVEL="${NICE_LEVEL:-0}"
ebegin "Starting $NAME"
start-stop-daemon --quiet --nicelevel $NICE_LEVEL --start --pidfile $PIDFILE --exec /usr/sbin/$NAME
eend $?
}
stop() {
ebegin "Stopping $NAME"
start-stop-daemon --quiet --stop --pidfile $PIDFILE
eend $?
}
# vim: filetype=gentoo-init-d:
|