diff options
Diffstat (limited to 'app-admin/monit/files/monit.initd-5.0-r1')
-rw-r--r-- | app-admin/monit/files/monit.initd-5.0-r1 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app-admin/monit/files/monit.initd-5.0-r1 b/app-admin/monit/files/monit.initd-5.0-r1 index 2a6339f9e6e8..b69241b942cd 100644 --- a/app-admin/monit/files/monit.initd-5.0-r1 +++ b/app-admin/monit/files/monit.initd-5.0-r1 @@ -1,39 +1,41 @@ #!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # $Id$ extra_commands="configtest" extra_started_commands="reload" +command="/usr/bin/monit" + depend() { use net } configtest() { - /usr/bin/monit -t 1>/dev/null 2>&1 + ${command} -t 1>/dev/null 2>&1 ret=$? if [ $ret -ne 0 ]; then eerror "${SVCNAME} has detected an error in your setup:" - /usr/bin/monit -t + ${command} -t fi return $ret } start() { ebegin "Starting monit" - start-stop-daemon --start --quiet --exec /usr/bin/monit >/dev/null 2>&1 + start-stop-daemon --start --quiet --exec ${command} >/dev/null 2>&1 eend $? } stop() { ebegin "Stopping monit" - start-stop-daemon --stop --quiet --exec /usr/bin/monit + start-stop-daemon --stop --quiet --exec ${command} eend $? } reload() { ebegin "Reloading monit" - /usr/bin/monit -c /etc/monitrc reload >/dev/null 2>&1 + ${command} -c /etc/monitrc reload >/dev/null 2>&1 eend $? } |