summaryrefslogtreecommitdiffstats
path: root/arno-iptables-firewall/arno-iptables-firewall.script
blob: 9607c0adf491ef95e8a867462512fe11fc812530 (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
54
55
56
57
58
59
60
61
62
63
#!/bin/bash

# general config
. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting Arno's Iptables Firewall Daemon"
      /usr/sbin/arno-iptables-firewall start &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon arno-iptables-firewall
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping Arno's Iptables Firewall Daemon"
    /usr/sbin/arno-iptables-firewall stop &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon arno-iptables-firewall
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 3
    $0 start
    ;;
  status)
    /usr/sbin/arno-iptables-firewall status
    ;;
  debug_start)
    stat_busy "Starting Arno's Iptables Firewall Daemon"
      /usr/sbin/arno-iptables-firewall start
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon arno-iptables-firewall
      stat_done
    fi
    ;;
  debug_stop)
    stat_busy "Stopping Arno's Iptables Firewall Daemon"
    /usr/sbin/arno-iptables-firewall stop
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon arno-iptables-firewall
      stat_done
    fi
    ;;
  debug_restart)
    $0 debug_stop
    sleep 3
    $0 debug_start
    ;;
  *)
    echo "usage: $0 {start|stop|restart|status|debug_start|debug_stop|debug_restart}"  
esac