From 147ddf903dde4c7e2b2ca4008449c10505bc5ae8 Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Sat, 28 Jan 2017 12:57:26 -0800 Subject: [PATCH] move message funcs into common --- common.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common.sh b/common.sh index 1309518..f4da792 100644 --- 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' "$@" } -- 2.43.2