quote -z and -n if vars

This commit is contained in:
Tommy Huff 2016-10-19 12:35:45 -04:00
parent 7455cac06c
commit 37868a86dd
2 changed files with 6 additions and 6 deletions

View file

@ -190,10 +190,10 @@ if [[ $# = 0 ]]; then
helpFunc
fi
if [[ -z ${setupVars} ]] ; then
if [[ -z "${setupVars}" ]] ; then
setupVars=/etc/pihole/setupVars.conf
fi
if [[ -f ${setupVars} ]];then
if [[ -f "${setupVars}" ]];then
. ${setupVars}
else
echo "::: WARNING: ${setupVars} missing. Possible installation failure."
@ -201,7 +201,7 @@ else
exit 1
fi
if [[ -n ${IPv6_address} ]] ; then
if [[ -n "${IPv6_address}" ]] ; then
piholeIP=${IPv6_address}
piholeIP=$(echo "${piholeIP}" | cut -f1 -d"/")
else

View file

@ -206,10 +206,10 @@ done
if [[ $# = 0 ]]; then
helpFunc
fi
if [[ -z ${setupVars} ]] ; then
if [[ -z "${setupVars}" ]] ; then
setupVars=/etc/pihole/setupVars.conf
fi
if [[ -f ${setupVars} ]];then
if [[ -f "${setupVars}" ]];then
. ${setupVars}
else
echo "::: WARNING: ${setupVars} missing. Possible installation failure."
@ -217,7 +217,7 @@ else
exit 1
fi
if [[ -n ${IPv6_address} ]] ; then
if [[ -n "${IPv6_address}" ]] ; then
piholeIP=${IPv6_address}
piholeIP=$(echo "${piholeIP}" | cut -f1 -d"/")
else