source:
trunk/packages/invirt-web-iptables/debian/invirt-web-iptables.init
@
2611
Last change on this file since 2611 was 1427, checked in by broder, 16 years ago | |
---|---|
|
|
File size: 750 bytes |
Rev | Line | |
---|---|---|
[1304] | 1 | #! /bin/sh |
[273] | 2 | ### BEGIN INIT INFO |
[1255] | 3 | # Provides: invirt-web-iptables |
[273] | 4 | # Required-Start: $local_fs $remote_fs |
5 | # Required-Stop: $local_fs $remote_fs | |
6 | # Default-Start: 2 3 4 5 | |
7 | # Default-Stop: 0 1 6 | |
[1255] | 8 | # Short-Description: Invirt web server iptables rules |
[273] | 9 | # Description: |
10 | ### END INIT INFO | |
11 | ||
[1255] | 12 | NAME=invirt-web-iptables |
13 | DESC="Invirt web server iptables rules" | |
14 | RULES=/usr/share/invirt-web-iptables/iptables.rules | |
[1253] | 15 | GEN_FILES=$RULES |
16 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
[273] | 17 | |
[1253] | 18 | dpkg -s "$NAME" >/dev/null 2>/dev/null || exit 0 |
[273] | 19 | |
[1253] | 20 | . /lib/init/gen-files.sh |
21 | . /lib/init/std-init.sh | |
[273] | 22 | |
23 | do_start() | |
24 | { | |
[1253] | 25 | gen_files |
[1427] | 26 | echo 1 > /proc/sys/net/ipv4/ip_forward |
[294] | 27 | /sbin/iptables-restore < $RULES |
[273] | 28 | } |
29 | ||
[1254] | 30 | do_reload() |
31 | { | |
32 | do_start | |
33 | } | |
34 | ||
[273] | 35 | do_stop() |
36 | { | |
[294] | 37 | return 0 |
[273] | 38 | } |
39 | ||
[1253] | 40 | std_init "$1" |
Note: See TracBrowser
for help on using the repository browser.