~ubuntu-branches/ubuntu/raring/arno-iptables-firewall/raring

« back to all changes in this revision

Viewing changes to contrib/Debian/init.d/arno-iptables-firewall

  • Committer: Package Import Robot
  • Author(s): Michael Hanke
  • Date: 2012-06-28 08:13:04 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120628081304-lyyj3i5te86rog54
Tags: 2.0.1.c-1
* Upstream bugfix release.
  - Fix a script 'IFS' issue if IPv6 and DMZ is enabled together with
    DMZ_HOST_OPEN_IP
  - Support for newer kernels (3.4+) which replace ipt_LOG & ip6t_LOG with
    xt_LOG

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# chkconfig: 2345 11 89
 
4
# description: init.d script for Arno's iptables firewall
 
5
 
 
6
### BEGIN INIT INFO
 
7
# Provides:          arno-iptables-firewall
 
8
# Required-Start:    $local_fs $remote_fs $network
 
9
# Required-Stop:     $local_fs $remote_fs $network
 
10
# Default-Start:     S
 
11
# Default-Stop:      0 6
 
12
# Short-Description: Setup iptables firewall configuration
 
13
### END INIT INFO
 
14
 
 
15
############################################################################################
 
16
# You should put this script in eg. "/etc/init.d/" .                                       #
 
17
# Furthermore make sure it's executable! -> "chmod 700" or "chmod +x" it                   #
 
18
# If you want to run it upon boot, either add an entry in your "/etc/rc.d/rc.local" or     #
 
19
# (for eg. Debian) in "/etc/rcS.d/" create a symlink to the arno-iptables-firewall script  #
 
20
# ("ln -s /etc/init.d/arno-iptables-firewall script S99-arno-iptables-firewall script").   #
 
21
############################################################################################
 
22
 
 
23
PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
24
PROGRAM="/usr/local/sbin/arno-iptables-firewall"
 
25
NAME="arno-iptables-firewall"
 
26
 
 
27
# Be verbose(1)?:
 
28
VERBOSE=0
 
29
 
 
30
test -x $PROGRAM || exit 0
 
31
 
 
32
. /lib/lsb/init-functions
 
33
 
 
34
if [ "$VERBOSE" = "0" ]; then
 
35
  case "$1" in
 
36
    start)
 
37
      log_daemon_msg "Starting Arno's Iptables Firewall..."
 
38
    ;;
 
39
 
 
40
    stop)
 
41
      log_daemon_msg "Stopping Arno's Iptables Firewall..."
 
42
    ;;
 
43
 
 
44
    restart)
 
45
      log_daemon_msg "Restarting Arno's Iptables Firewall..."
 
46
    ;;
 
47
 
 
48
    force-reload)
 
49
      log_daemon_msg "(Forced) reloading Arno's Iptables Firewall..."
 
50
    ;;
 
51
 
 
52
    status)
 
53
      $PROGRAM $*
 
54
      exit $?
 
55
    ;;
 
56
 
 
57
    *)
 
58
      $PROGRAM
 
59
      exit 1
 
60
    ;;
 
61
  esac
 
62
 
 
63
  # Call firewall script:
 
64
  result=`$PROGRAM $*`
 
65
  retval=$?
 
66
else
 
67
  $PROGRAM $*
 
68
  retval=$?
 
69
fi
 
70
 
 
71
# Return value:
 
72
exit $retval