mirror of
https://github.com/mynodebtc/mynode.git
synced 2025-01-11 19:30:11 +00:00
Modify DNS settings
This commit is contained in:
parent
2fa826c903
commit
dac819c9df
|
@ -55,6 +55,7 @@ runUnattended=false
|
|||
IPv4dev=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++)if($i~/dev/)print $(i+1)}')
|
||||
IPv4addr=$(ip route get 8.8.8.8| awk '{print $7}')
|
||||
IPv4gw=$(ip route get 8.8.8.8 | awk '{print $3}')
|
||||
IPv4dns=8.8.8.8
|
||||
|
||||
availableInterfaces=$(ip -o link | grep "state UP" | awk '{print $2}' | cut -d':' -f1 | cut -d'@' -f1)
|
||||
dhcpcdFile=/etc/dhcpcd.conf
|
||||
|
@ -150,12 +151,6 @@ avoidStaticIPv4Ubuntu() {
|
|||
echo "We aren't Ubuntu (probably)..."
|
||||
}
|
||||
|
||||
getStaticIPv4Settings() {
|
||||
# Dont prompt for IP
|
||||
echo "Using DHCP address as static IP..."
|
||||
IPv4dns="8.8.8.8"
|
||||
}
|
||||
|
||||
setDHCPCD() {
|
||||
# Append these lines to dhcpcd.conf to enable a static IP
|
||||
echo "interface ${pivpnInterface}
|
||||
|
@ -1005,7 +1000,6 @@ main() {
|
|||
if [[ $PLAT != "Raspbian" ]]; then
|
||||
avoidStaticIPv4Ubuntu
|
||||
else
|
||||
getStaticIPv4Settings
|
||||
setStaticIPv4
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user