fix service add
authorJustin Wind <justin.wind+git@gmail.com>
Wed, 25 Jan 2017 00:41:24 +0000 (19:41 -0500)
committerJustin Wind <justin.wind+git@gmail.com>
Wed, 25 Jan 2017 00:41:24 +0000 (19:41 -0500)
common.sh

index f8860fcb1adf50868d549a147cfeb5f57ef23ea9..f2a7f549dfaf4122dfacbdcb7ce489ef7ae31e71 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -85,9 +85,9 @@ function reload_cidr_sets(){
 }
 
 function add_service_entry(){
-       local port/proto
-       port=$(echo "${s}" | cut -d/ -f1)
-       proto=$(echo "${s}" | cut -d/ -f2)
+       local port proto
+       port=$(echo "$1" | cut -d/ -f1)
+       proto=$(echo "$1" | cut -d/ -f2)
        $IPSET -exist add allowed_${proto} ${port}
 }