Browse Source

Added initscript

bbruns 4 years ago
parent
commit
f947397769
1 changed files with 35 additions and 0 deletions
  1. 35
    0
      doc/srfirewall.init

+ 35
- 0
doc/srfirewall.init View File

@@ -0,0 +1,35 @@
1
+#!/bin/bash
2
+### BEGIN INIT INFO
3
+# Provides:          srfirewall
4
+# Required-Start:    $local_fs $network $remote_fs
5
+# Required-Stop:     $local_fs $network $remote_fs
6
+# Should-Start:	     $network $syslog iptables
7
+# Should-Stop:	     $network $syslog iptables
8
+# X-Start-Before:    
9
+# X-Stop-After:      
10
+# Default-Start:     2 3 4 5
11
+# Default-Stop:      0 1 6
12
+# Short-Description: Manage firewall status
13
+# Description:       Manage SRFirewall status
14
+### END INIT INFO
15
+
16
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
17
+FIREWALL_CMD=/usr/local/bin/srfirewall
18
+. /lib/lsb/init-functions
19
+
20
+case "${1:-}" in
21
+  start)
22
+        log_begin_msg "Starting SRFirewall..."
23
+        $FIREWALL_CMD
24
+        log_end_msg $?
25
+  ;;
26
+  stop)
27
+        log_begin_msg "Stopping SRFirewall..."
28
+	$FIREWALL_CMD -f
29
+        log_end_msg $?
30
+  ;;
31
+  *)
32
+        log_success_msg "Usage: $0 {start|stop}"
33
+        exit 1
34
+esac
35
+exit 0

Loading…
Cancel
Save