* [gentoo-commits] gentoo-x86 commit in net-analyzer/munin/files: munin-node_init.d_1.4.7
@ 2012-07-07 7:21 Justin Lecher (jlec)
0 siblings, 0 replies; only message in thread
From: Justin Lecher (jlec) @ 2012-07-07 7:21 UTC (permalink / raw
To: gentoo-commits
jlec 12/07/07 07:21:50
Added: munin-node_init.d_1.4.7
Log:
Add fix when /var/run is on tmpfs
(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)
Revision Changes Path
1.1 net-analyzer/munin/files/munin-node_init.d_1.4.7
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/munin/files/munin-node_init.d_1.4.7?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/munin/files/munin-node_init.d_1.4.7?rev=1.1&content-type=text/plain
Index: munin-node_init.d_1.4.7
===================================================================
#!/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_1.4.7,v 1.1 2012/07/07 07:21:50 jlec Exp $
get_munin_config() {
awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
}
: ${NAME:="munin-node"}
: ${CFGFILE:=/etc/munin/munin-node.conf}
: ${PIDFILE:=$(get_munin_config pid_file)}
: ${NICE_LEVEL:=0}
fix_dirs() {
local rundir piddir
piddir=$(dirname ${PIDFILE})
rundir="/var/run/munin/plugin-state /var/run/munin/spool"
for dir in ${piddir} ${rundir}; do
[ -d ${dir} ] || mkdir -p ${dir}
chown munin:munin ${dir}
done
}
depend() {
config "$CFGFILE"
need net
before cron
[ "$(get_munin_config log_file)" == "Sys::Syslog" ] && \
use logger
}
start() {
fix_dirs
ebegin "Starting $NAME"
start-stop-daemon --nicelevel $NICE_LEVEL --start --pidfile $PIDFILE --exec /usr/sbin/$NAME -- \
--config "$CFGFILE"
eend $?
}
stop() {
ebegin "Stopping $NAME"
start-stop-daemon --stop --pidfile $PIDFILE
eend $?
}
# vim: filetype=gentoo-init-d:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-07 7:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-07 7:21 [gentoo-commits] gentoo-x86 commit in net-analyzer/munin/files: munin-node_init.d_1.4.7 Justin Lecher (jlec)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox