From 394842d31c51cb642d7ed7a65948d15fd65985ce Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Thu, 11 Jun 2009 09:29:18 +0200
Subject: fix some init scripts / postinst scripts

---
 package/monit/files/monit.init     | 6 +++++-
 package/monit/files/monit.postinst | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 package/monit/files/monit.postinst

(limited to 'package/monit')

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
+
-- 
cgit v1.2.3