diff options
author | Pedro Arizmendi <silmano@gmail.com> | 2016-04-15 22:22:50 +0200 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2016-04-16 10:19:09 +0800 |
commit | 0e2344606097901a206be3778e8e1c56054e91f8 (patch) | |
tree | c1d9b1fd9c36a3f3ecfc8af619731fee359fcdd7 /www-misc/monitorix/files/monitorix.init | |
parent | www-misc/monitorix: add user 'silmano' and g-p-m to metadata.xml (diff) | |
download | gentoo-0e2344606097901a206be3778e8e1c56054e91f8.tar.gz gentoo-0e2344606097901a206be3778e8e1c56054e91f8.tar.bz2 gentoo-0e2344606097901a206be3778e8e1c56054e91f8.zip |
www-misc/monitorix: Renamed init file
Renamed the init file to just the package name,
since the same version its compatible with higher
package versions.
Package-Manager: portage-2.2.26
Closes: https://github.com/gentoo/gentoo/pull/1269
Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'www-misc/monitorix/files/monitorix.init')
-rw-r--r-- | www-misc/monitorix/files/monitorix.init | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/www-misc/monitorix/files/monitorix.init b/www-misc/monitorix/files/monitorix.init new file mode 100644 index 000000000000..630636f1eed3 --- /dev/null +++ b/www-misc/monitorix/files/monitorix.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/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 $? +} |