-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathl7-filter.init
More file actions
executable file
·78 lines (70 loc) · 1.2 KB
/
l7-filter.init
File metadata and controls
executable file
·78 lines (70 loc) · 1.2 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
#
# l7-filter: Start/Stop the l7-filter daemon.
#
# chkconfig: 2345 90 60
# description: Application Layer Packet Classifier for Linux
# processname: l7-filter
# config: /etc/l7-filter/l7-filter.conf
# Source function library.
. /etc/init.d/functions
prog="l7-filter"
RETVAL=0
L7_FILTER_PID="/var/run/l7-filter.pid"
L7_FILTER_CONF="/etc/l7-filter/l7-filter.conf"
# See how we were called.
start() {
echo -n $"Starting $prog: "
/sbin/modprobe ip_conntrack_netlink
daemon /usr/bin/$prog -f $L7_FILTER_CONF -z -s
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
touch /var/lock/subsys/$prog
fi
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $L7_FILTER_PID /var/lock/subsys/$prog
return $RETVAL
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading $prog configuration: "
killproc $prog -HUP
RETVAL=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
status $prog
exit $?
;;
condrestart)
[ -f /var/lock/subsys/$prog ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
exit $?