fixed errors in edit_ssid script

This commit is contained in:
Kristjan Komlosi
2019-11-10 18:31:00 +01:00
parent 6981c821cc
commit f3a22fa511
2 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# edit_ssid.sh - edits hostapd.conf and sets a MAC address-based SSID
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 > hostapd.conf
sed "/ssid=.*/s/ssid=.*/ssid=$ssid/" hostapd.conf > newconf
mv newconf hostapd.conf

View File

@@ -8,7 +8,7 @@ cp -R hostapd/ /etc
cp -R lighttpd/ /etc
cp dnsmasq.conf /etc
cp rc.local /etc
cp -R ../frontend /var/www/html
cp -R ../frontend/* /var/www/html
mkdir -p /usr/local/lib/terahz
cp -R ../backend/* /usr/local/lib/terahz
cd /etc/hostapd