diff --git a/etcs/hostapd/edit_ssid.sh b/etcs/hostapd/edit_ssid.sh index e02656d..1e6bc89 100644 --- a/etcs/hostapd/edit_ssid.sh +++ b/etcs/hostapd/edit_ssid.sh @@ -1,5 +1,6 @@ #!/bin/bash # edit_ssid.sh - edits hostapd.conf and sets a MAC address-based SSID +cd `dirname $0` ssid=`ip link | awk '/wlan0/ {getline; print $2}' | awk -v FS=':' '{printf("TeraHz_%s%s%s\n", $4, $5, $6)}'` sed "/ssid=.*/s/ssid=.*/ssid=$ssid/" hostapd.conf > newconf mv newconf hostapd.conf