packages/admin/monit/files/monit.init
nico 3dc31f9f9f packages/monit: use new service functions, fix /etc/monitrc permissions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28887 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-09 19:48:55 +00:00

17 lines
287 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=60
SERVICE_USE_PID=1
start() {
[ -f /etc/monitrc ] || return 1
[ "$(stat -c "%a" /etc/monitrc)" = "0700" ] || chmod 0700 /etc/monitrc
service_start /usr/bin/monit -d 60
}
stop() {
service_stop /usr/bin/monit
}