diff options
author | 2013-03-13 18:21:24 +0000 | |
---|---|---|
committer | 2013-03-13 18:21:24 +0000 | |
commit | 64484bb50eb9bd7d553909a40e33a55c4732585f (patch) | |
tree | 340d9d490eae9bc017ccc353e0e6f3dc08572395 /www-misc/monitorix/files | |
parent | Remove old versions (diff) | |
download | gentoo-2-64484bb50eb9bd7d553909a40e33a55c4732585f.tar.gz gentoo-2-64484bb50eb9bd7d553909a40e33a55c4732585f.tar.bz2 gentoo-2-64484bb50eb9bd7d553909a40e33a55c4732585f.zip |
New ebuild. Thanks to mren for reporting, thanks to Matthew Connelly for contributing an ebuild and an init script. Fixes bug #281087 and bug #417009.
(Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
Diffstat (limited to 'www-misc/monitorix/files')
-rw-r--r-- | www-misc/monitorix/files/monitorix-3.0.0.init | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/www-misc/monitorix/files/monitorix-3.0.0.init b/www-misc/monitorix/files/monitorix-3.0.0.init new file mode 100644 index 000000000000..5cf2408b511e --- /dev/null +++ b/www-misc/monitorix/files/monitorix-3.0.0.init @@ -0,0 +1,24 @@ +#! /sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting monitorix" + start-stop-daemon --start --exec /usr/sbin/monitorix --pidfile /var/run/monitorix.pid -- -c /etc/monitorix.conf -p /var/run/monitorix.pid + local i=0 + local timeout=5 + while [ ! -f /var/run/monitorix.pid ] && [ $i -le $timeout ]; do + sleep 1 + i=$(($i + 1)) + done + [ $timeout -gt $i ] + eend $? +} + +stop() { + ebegin "Stopping monitorix" + start-stop-daemon --stop --signal QUIT --stop --exec /usr/sbin/monitorix --pidfile /var/run/monitorix.pid + eend $? +} |