Skip to content

Commit

Permalink
Deploy: Added script for initial Wifi hotspot
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendade committed Dec 1, 2019
1 parent 9d9111b commit ee3fc10
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions deploy/wifi_access_point.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e
set -x

# this script sets up the wifi access point

# Create Access Point
APNAME="WiFiAP"
SSID="rpanion"
KEY="rpanion"

IFNAME=wlan0
sudo nmcli connection add type wifi ifname $IFNAME con-name $APNAME ssid $SSID
sudo nmcli connection modify $APNAME 802-11-wireless.mode ap
sudo nmcli connection modify $APNAME 802-11-wireless.band bg
sudo nmcli connection modify $APNAME ipv4.method shared
sudo nmcli connection modify $APNAME wifi-sec.key-mgmt wpa-psk
sudo nmcli connection modify $APNAME ipv4.addresses 10.0.1.1/24
sudo nmcli connection modify $APNAME wifi-sec.psk "$KEY"
sudo nmcli connection modify $APNAME 802-11-wireless-security.group ccmp
sudo nmcli connection modify $APNAME 802-11-wireless-security.pairwise ccmp
sudo nmcli connection up $APNAME

0 comments on commit ee3fc10

Please sign in to comment.