-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy: Added script for initial Wifi hotspot
- Loading branch information
1 parent
9d9111b
commit ee3fc10
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|