mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-28 17:13:17 +00:00
Variables for IP and INT files.
This commit is contained in:
parent
72becc3c17
commit
e8a5ba1100
1 changed files with 7 additions and 4 deletions
|
@ -36,6 +36,9 @@ columns=$(tput cols)
|
||||||
r=$(( rows / 2 ))
|
r=$(( rows / 2 ))
|
||||||
c=$(( columns / 2 ))
|
c=$(( columns / 2 ))
|
||||||
|
|
||||||
|
piholeINTfile=/etc/pihole/piholeINT
|
||||||
|
piholeIPfile=/etc/pihole/piholeIP
|
||||||
|
piholeIPv6file=/etc/pihole/.useIPv6
|
||||||
|
|
||||||
availableInterfaces=$(ip -o link | awk '{print $2}' | grep -v "lo" | cut -d':' -f1)
|
availableInterfaces=$(ip -o link | awk '{print $2}' | grep -v "lo" | cut -d':' -f1)
|
||||||
dhcpcdFile=/etc/dhcpcd.conf
|
dhcpcdFile=/etc/dhcpcd.conf
|
||||||
|
@ -219,8 +222,8 @@ use4andor6() {
|
||||||
then
|
then
|
||||||
echo "::: Leaving IPv4 settings as is."
|
echo "::: Leaving IPv4 settings as is."
|
||||||
# Saving the IP and interface to a file for future use by other scripts (gravity.sh, whitelist.sh, etc.)
|
# Saving the IP and interface to a file for future use by other scripts (gravity.sh, whitelist.sh, etc.)
|
||||||
echo ${IPv4addr%/*} > /etc/pihole/piholeIP
|
echo ${IPv4addr%/*} > "${piholeIPfile}"
|
||||||
echo $piholeInterface > /etc/pihole/piholeINT
|
echo $piholeInterface > "${piholeINTfile}"
|
||||||
else
|
else
|
||||||
getStaticIPv4Settings
|
getStaticIPv4Settings
|
||||||
setStaticIPv4
|
setStaticIPv4
|
||||||
|
@ -287,8 +290,8 @@ getStaticIPv4Settings() {
|
||||||
Gateway: $IPv4gw" $r $c)then
|
Gateway: $IPv4gw" $r $c)then
|
||||||
# If the settings are correct, then we need to set the piholeIP
|
# If the settings are correct, then we need to set the piholeIP
|
||||||
# Saving the IP and interface to a file for future use by other scripts (gravity.sh, whitelist.sh, etc.)
|
# Saving the IP and interface to a file for future use by other scripts (gravity.sh, whitelist.sh, etc.)
|
||||||
echo ${IPv4addr%/*} > /etc/pihole/piholeIP
|
echo ${IPv4addr%/*} > "${piholeIPfile}"
|
||||||
echo $piholeInterface > /etc/pihole/piholeINT
|
echo $piholeInterface > "${piholeINTfile}"
|
||||||
# After that's done, the loop ends and we move on
|
# After that's done, the loop ends and we move on
|
||||||
ipSettingsCorrect=True
|
ipSettingsCorrect=True
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue