mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
monit: switch init script to procd
Successfully tested on ar71xx Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
This commit is contained in:
@@ -1,16 +1,15 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006-2013 OpenWrt.org
|
# Copyright (C) 2014 OpenWrt.org
|
||||||
|
|
||||||
START=60
|
START=60
|
||||||
|
USE_PROCD=1
|
||||||
|
PROG=/usr/bin/monit
|
||||||
|
|
||||||
SERVICE_USE_PID=1
|
start_service() {
|
||||||
|
[ -f /etc/monitrc ] || { echo "monit: /etc/monitrc is missing"; return 1; }
|
||||||
start() {
|
|
||||||
[ -f /etc/monitrc ] || return 1
|
|
||||||
chmod 0600 /etc/monitrc
|
chmod 0600 /etc/monitrc
|
||||||
service_start /usr/bin/monit
|
procd_open_instance
|
||||||
}
|
# -I runs in foreground, as procd requires
|
||||||
|
procd_set_param command "$PROG" -I
|
||||||
stop() {
|
procd_close_instance
|
||||||
service_stop /usr/bin/monit
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user