diff --git a/blacklist-add.sh b/blacklist-add.sh index 4b1a36b..27868ce 100755 --- a/blacklist-add.sh +++ b/blacklist-add.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash add_entry () { @@ -24,14 +24,14 @@ add_entry_domainandsub () add_entry '*.'$1'/.*' } -if [ "$1" == '' ]; then +if [[ $1 == '' ]]; then echo 'E| you must specify the domain to add' exit 1 fi -if [ "$2" == 0 ]; then +if [[ $2 == 0 ]]; then add_entry_domainonly $1 -elif [ "$2" == 1 ]; then +elif [[ $2 == 1 ]]; then add_entry_domainandsub $1 else echo 'E| second parameter must be one of [ 0 | 1 ]'