mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-02-26 21:18:18 +00:00
add ip var check
This commit is contained in:
parent
acfd56a7b9
commit
35df1844cb
1 changed files with 6 additions and 0 deletions
|
@ -323,6 +323,12 @@ if [[ -r ${piholeDir}/pihole.conf ]];then
|
||||||
echo "::: pihole.conf file no longer supported. Over-rides in this file are ignored."
|
echo "::: pihole.conf file no longer supported. Over-rides in this file are ignored."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# make sure $IPv6_address or $IPv4_address are set
|
||||||
|
if [[ -z "${IPv6_address}" ]] && [[ -z "${IPv4_address}" ]] ; then
|
||||||
|
echo "::: No IP Values found! Please run 'pihole -r' and choose reconfigure to restore values"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
#remove CIDR from IPs
|
#remove CIDR from IPs
|
||||||
if [[ -n "${IPv6_address}" ]] ; then
|
if [[ -n "${IPv6_address}" ]] ; then
|
||||||
IPv6_address=$(echo "${IPv6_address}" | cut -f1 -d"/")
|
IPv6_address=$(echo "${IPv6_address}" | cut -f1 -d"/")
|
||||||
|
|
Loading…
Add table
Reference in a new issue