diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/munin/files/munin-node_init.d_2.0.7 |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/munin/files/munin-node_init.d_2.0.7')
-rw-r--r-- | net-analyzer/munin/files/munin-node_init.d_2.0.7 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net-analyzer/munin/files/munin-node_init.d_2.0.7 b/net-analyzer/munin/files/munin-node_init.d_2.0.7 new file mode 100644 index 000000000000..7932e356f2e8 --- /dev/null +++ b/net-analyzer/munin/files/munin-node_init.d_2.0.7 @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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} --wait 1500" +extra_started_commands="reload" + +depend() { + config "$CFGFILE" + + 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: |