blob: 29c8b2c70fe9bc4800a8625a5ef4431a11584b02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/bin/sh
#
# Startup script for the mandi daemon (oblin@mandriva.com)
#
# chkconfig: 2345 26 59
#
# description: Network monitoring daemon (Interactive Firewall and wireless)
#
### BEGIN INIT INFO
# Provides: mandi
# Should-Start: shorewall
# Required-Start: messagebus
# Required-Stop: messagebus
# Default-Start: 2 3 4 5
# Short-Description: Network monitoring daemon
# Description: Network monitoring daemon (Interactive Firewall and wireless)
### END INIT INFO
. /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
|