mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 08:10:14 +00:00
quote -z and -n if vars
This commit is contained in:
parent
7455cac06c
commit
37868a86dd
2 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue