mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Add trap to check existence of setupVars
This commit is contained in:
parent
fc4fe54099
commit
51c4c51d9e
1 changed files with 9 additions and 1 deletions
10
gravity.sh
10
gravity.sh
|
@ -32,7 +32,15 @@ whitelistScript=/opt/pihole/whitelist.sh
|
|||
blacklistScript=/opt/pihole/blacklist.sh
|
||||
|
||||
#Source the setupVars from install script for the IP
|
||||
. /etc/pihole/setupVars.conf
|
||||
setupVars=/etc/pihole/setupVars.conf
|
||||
if [[ -f ${setupVars} ]];then
|
||||
. /etc/pihole/setupVars.conf
|
||||
else
|
||||
echo "::: WARNING: /etc/pihole/setupVars.conf missing. Possible installation failure."
|
||||
echo "::: Please run 'pihole -r', and choose the 'install' option to reconfigure."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#Remove the /* from the end of the IPv4addr.
|
||||
IPv4addr=${IPv4_address%/*}
|
||||
|
||||
|
|
Loading…
Reference in a new issue