diff options
author | Jeroen Roovers <jer@gentoo.org> | 2015-01-20 16:51:09 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2015-01-20 16:51:09 +0000 |
commit | 84ed056dc5f6bf2d465d709594520ea543936d9e (patch) | |
tree | bc78b1f35e53182478e568fbcdb4a292f329865c /net-analyzer/vnstat/files | |
parent | Finally fix underlinking, bug #370111 (diff) | |
download | historical-84ed056dc5f6bf2d465d709594520ea543936d9e.tar.gz historical-84ed056dc5f6bf2d465d709594520ea543936d9e.tar.bz2 historical-84ed056dc5f6bf2d465d709594520ea543936d9e.zip |
Version bump.
Package-Manager: portage-2.2.15/cvs/Linux x86_64
Manifest-Sign-Key: 0xA792A613
Diffstat (limited to 'net-analyzer/vnstat/files')
-rw-r--r-- | net-analyzer/vnstat/files/vnstatd.initd-r1 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r1 b/net-analyzer/vnstat/files/vnstatd.initd-r1 new file mode 100644 index 000000000000..4b8aa7a11080 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.initd-r1 @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/files/vnstatd.initd-r1,v 1.1 2015/01/20 16:51:08 jer Exp $ + +extra_started_commands="reload" + +depend() { + use net +} + +VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/run/vnstatd/vnstatd.pid}" + +start() { + ebegin "Starting vnstatd" + checkpath -q -d -m 755 -o vnstat:vnstat /run/vnstatd + checkpath -q -d -m 755 -o vnstat:vnstat /var/lib/vnstat + start-stop-daemon --start --quiet \ + --pidfile "${VNSTATD_PIDFILE}" \ + --user vnstat --group vnstat \ + --nicelevel ${VNSTATD_NICELEVEL:-0} \ + --exec /usr/bin/vnstatd -- \ + -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping vnstatd" + start-stop-daemon --stop --quiet \ + --pidfile "${VNSTATD_PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading vnstatd configuration" + kill -HUP $(cat "${VNSTATD_PIDFILE}") 2>&1 >/dev/null + eend $? +} |