summaryrefslogtreecommitdiff
path: root/package/monit
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-06-11 09:29:18 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-06-11 09:29:18 +0200
commit394842d31c51cb642d7ed7a65948d15fd65985ce (patch)
tree2a04d2d18fcdb8b955d294b84c396f83183a103e /package/monit
parente874f84fdb6eb83d905a72b35d87398374594b97 (diff)
fix some init scripts / postinst scripts
Diffstat (limited to 'package/monit')
-rw-r--r--package/monit/files/monit.init6
-rw-r--r--package/monit/files/monit.postinst5
2 files changed, 10 insertions, 1 deletions
diff --git a/package/monit/files/monit.init b/package/monit/files/monit.init
index 91a7aca4b..712e7899b 100644
--- a/package/monit/files/monit.init
+++ b/package/monit/files/monit.init
@@ -6,7 +6,11 @@
case $1 in
autostop) ;;
-autostart|start)
+autostart)
+ test x"${monit:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
monit $monit_flags
;;
stop)
diff --git a/package/monit/files/monit.postinst b/package/monit/files/monit.postinst
new file mode 100644
index 000000000..fa7523993
--- /dev/null
+++ b/package/monit/files/monit.postinst
@@ -0,0 +1,5 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf monit monit NO
+add_rcconf monit_flags monit_flags NO
+