Skip to content

Commit

Permalink
DNS Servers as optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzopizzari committed Mar 19, 2018
1 parent fa999e8 commit bc31ec5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ Make sure you are not runing `wpa_supplicant` on your host machine or docker con
root 22619 0.0 0.4 6616 3700 ? Ss 22:04 0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -C /run/wpa_supplicant
```

## Environment Variables

| Name | Required | Description | Default Value |
|:---------------:|:--------:|:------------------------------:|:-------------:|
| INTERFACE | true | The wireless interface | |
| CHANNEL | false | WiFi Channel to use | 11 |
| SSID | false | WiFi Name | raspberry |
| AP\_ADDR | false | Access Point IP Address | 192.168.254.1 |
| SUBNET | false | WiFi network subnet | 192.168.254.0 |
| WPA\_PASSPHRASE | false | WiFi Password | passw0rd |
| OUTGOINGS | false | Interfaces to external traffic | |
| HW\_MODE | false | Hardware protocol | g |

# Todo

Improve README.md
4 changes: 3 additions & 1 deletion wlanstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ fi
# Default values
true ${SUBNET:=192.168.254.0}
true ${AP_ADDR:=192.168.254.1}
true ${PRI_DNS:=8.8.8.8}
true ${SEC_DNS:=8.8.4.4}
true ${SSID:=raspberry}
true ${CHANNEL:=11}
true ${WPA_PASSPHRASE:=passw0rd}
Expand Down Expand Up @@ -102,7 +104,7 @@ fi
echo "Configuring DHCP server .."

cat > "/etc/dhcpd.conf" <<EOF
option domain-name-servers 8.8.8.8, 8.8.4.4;
option domain-name-servers ${PRI_DNS}, ${SEC_DNS};
option subnet-mask 255.255.255.0;
option routers ${AP_ADDR};
subnet ${SUBNET} netmask 255.255.255.0 {
Expand Down

0 comments on commit bc31ec5

Please sign in to comment.