forked from rfxn/advanced-policy-firewall
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Change] removed use of *_URL_PROT variables, URL's should now be ful…
…ly qualified URI's (e.g: http://domain.com/path/file , ftp://domain.com/path/file) [New] added locking support to prevent multiple start,stop,restart,refresh operations from potentially running on top of each other
- Loading branch information
Showing
6 changed files
with
55 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,11 @@ VER="1.7.5" | |
CNF="/etc/apf/conf.apf" | ||
|
||
head() { | ||
echo "Advanced Policy Firewall (APF) v$VER <[email protected]>" | ||
echo " Copyright (C) 2002-2014, R-fx Networks <[email protected]>" | ||
echo " Copyright (C) 2014, Ryan MacDonald <[email protected]>" | ||
echo "This program may be freely redistributed under the terms of the GNU GPL" | ||
echo "" | ||
echo "Advanced Policy Firewall (APF) v$VER <[email protected]>" | ||
echo " Copyright (C) 2002-2014, R-fx Networks <[email protected]>" | ||
echo " Copyright (C) 2014, Ryan MacDonald <[email protected]>" | ||
echo "This program may be freely redistributed under the terms of the GNU GPL" | ||
echo "" | ||
} | ||
|
||
if [ -f "$CNF" ] && [ ! "$CNF" == "" ]; then | ||
|
@@ -90,7 +90,7 @@ else | |
fi | ||
fi | ||
|
||
# check uptiime is greater than 5 minutes (300s) | ||
# check uptime is greater than 5 minutes (300s) | ||
UPSEC=`cat /proc/uptime | tr '.' ' ' | awk '{print$1}'` | ||
if [ "$UPSEC" -lt "300" ]; then | ||
SET_FASTLOAD_UPSEC=1 | ||
|
@@ -163,9 +163,11 @@ fi | |
|
||
case "$1" in | ||
-s|--start) | ||
get_state | ||
start | ||
;; | ||
-f|--flush|--stop) | ||
get_state | ||
flush | ||
;; | ||
-l|--list) | ||
|
@@ -176,6 +178,7 @@ case "$1" in | |
;; | ||
|
||
-r|--restart) | ||
get_state | ||
$0 --flush | ||
sleep 2 | ||
$0 --start | ||
|
@@ -194,6 +197,7 @@ case "$1" in | |
fi | ||
;; | ||
-e|--refresh) | ||
get_state | ||
refresh | ||
;; | ||
-o|--ovars) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters