From c72c0800fcc1488260df5a9dca7baa769ada9e6b Mon Sep 17 00:00:00 2001 From: Kristjan Komlosi Date: Mon, 11 Nov 2019 17:41:55 +0100 Subject: [PATCH] made edit_ssid.sh path-independent --- etcs/hostapd/edit_ssid.sh | 1 + 1 file changed, 1 insertion(+) 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