summaryrefslogtreecommitdiffstats
path: root/scripts/mandi.init
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mandi.init')
-rw-r--r--scripts/mandi.init45
1 files changed, 45 insertions, 0 deletions
diff --git a/scripts/mandi.init b/scripts/mandi.init
new file mode 100644
index 0000000..1fa205c
--- /dev/null
+++ b/scripts/mandi.init
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Startup script for the mandi daemon (oblin@mandriva.com)
+#
+# chkconfig: 2345 26 59
+#
+# description: Network monitoring daemon (Interactive Firewall and wireless)
+#
+#
+
+. /etc/init.d/functions
+
+case "$1" in
+ start)
+ gprintf "Starting mandi daemon: "
+ daemon /usr/sbin/mandi -d
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mandi
+ ;;
+ stop)
+ gprintf "Shutting down mandi daemon: "
+ killproc mandi
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/mandi
+ ;;
+ status)
+ status mandi
+ RETVAL=$?
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/mandi ] && restart || :
+ ;;
+ *)
+ gprintf "Usage: %s {start|stop|status|restart}\n" "$0"
+ RETVAL=1
+ ;;
+esac
+
+exit $RETVAL