mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-04 23:42:07 +01:00
37 lines
870 B
Plaintext
37 lines
870 B
Plaintext
#!/sbin/openrc-run
|
|
# Copyright 1999-2011 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License, v2 or later
|
|
# $Header: /var/cvsroot/gentoo-x86/app-admin/monit/files/monit.initd-5.0-r1,v 1.2 2011/12/31 16:28:50 idl0r Exp $
|
|
|
|
supervisor=supervise-daemon
|
|
|
|
name="monit"
|
|
description="Monit service supervisor"
|
|
|
|
command=/usr/bin/monit
|
|
command_args="-c ${CONF:-/etc/monitrc}"
|
|
command_args_foreground="-I"
|
|
|
|
extra_commands="configtest"
|
|
extra_started_commands="reload"
|
|
|
|
depend() {
|
|
use net
|
|
}
|
|
|
|
configtest() {
|
|
/usr/bin/monit -t -c "$CONF" 1>/dev/null 2>&1
|
|
ret=$?
|
|
if [ $ret -ne 0 ]; then
|
|
eerror "${RC_SVCNAME} has detected an error in your setup:"
|
|
/usr/bin/monit -t "$CONF"
|
|
fi
|
|
return $ret
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading monit"
|
|
$command -c "$CONF" reload >/dev/null 2>&1
|
|
eend $?
|
|
}
|