Skip to content

Commit

Permalink
Hostapd install fix
Browse files Browse the repository at this point in the history
V0.4.1
  • Loading branch information
darkdrgn2k authored Mar 9, 2019
2 parents b4a2fef + cd03d21 commit da6a550
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/hostapd/install
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
H_DNS_SERVER_0="fc4d:c8e5:9efe:9ac2:8e72:fcf7:6ce8:39dc"
H_DNS_SERVER_1="fc6e:691e:dfaa:b992:a10a:7b49:5a1a:5e09"
H_DNS_SERVER_2="fc16:b44c:2bf9:467:8098:51c6:5849:7b4f"
H_DNS_SERVER_3="fc41:47b9:dd78:ff21:1b24:dab8:3f81:168e"

# Internet DNS servers
I_DNS_SERVER_0="1.1.1.1"
Expand Down Expand Up @@ -105,6 +106,7 @@ if [ ! -z "$WITH_H_DNS" ] && [ "$WITH_H_DNS" == "true" ]; then
echo "server=$H_DNS_SERVER_0" | sudo tee --append /etc/dnsmasq.conf
echo "server=$H_DNS_SERVER_1" | sudo tee --append /etc/dnsmasq.conf
echo "server=$H_DNS_SERVER_2" | sudo tee --append /etc/dnsmasq.conf
echo "server=$H_DNS_SERVER_3" | sudo tee --append /etc/dnsmasq.conf
elif [ ! -z "$WITH_CJDNS_IPTUNNEL" ] && [ "$WITH_CJDNS_IPTUNNEL" ]; then
echo "server=$I_DNS_SERVER_0" | sudo tee --append /etc/dnsmasq.conf
echo "server=$I_DNS_SERVER_1" | sudo tee --append /etc/dnsmasq.conf
Expand Down Expand Up @@ -133,6 +135,9 @@ if [ -f /etc/default/hostapd ]; then
sudo echo DAEMON_CONF="/etc/hostapd.conf" | sudo tee --append /etc/default/hostapd > /dev/null
fi

# remove existing file that may be masking the service
sudo rm -rf /etc/systemd/system/hostapd.service

sudo cp "$BASE_DIR/hostapd.service" /etc/systemd/system/hostapd.service
sudo systemctl daemon-reload
sudo systemctl enable hostapd.service
Expand Down

0 comments on commit da6a550

Please sign in to comment.