projects
/
firewall-squeep
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f282d4
)
move message funcs into common
author
Justin Wind
<justin.wind+git@gmail.com>
Sat, 28 Jan 2017 20:57:26 +0000
(12:57 -0800)
committer
Justin Wind
<justin.wind+git@gmail.com>
Sat, 28 Jan 2017 20:57:26 +0000
(12:57 -0800)
common.sh
patch
|
blob
|
history
diff --git
a/common.sh
b/common.sh
index 1309518af3bce28ffed72d4eb3c72be87ba6d3da..f4da792d9fcdb455cd923cac167b76424c6a7b36 100644
(file)
--- a/
common.sh
+++ b/
common.sh
@@
-6,6
+6,17
@@
IPTABLES=$(which iptables)
IP6TABLES=$(which ip6tables)
IPSET=$(which ipset)
+err(){
+ echo "$@" 1>&2
+}
+
+die(){
+ local status=$1
+ shift
+ err "$@"
+ exit ${status}
+}
+
function decommentcat(){
sed 's/\s*#.*$//;/^\s*$/d' "$@"
}