i would like to set up few Raspberries access points, that would have different SSIDs but would work with the same hostapd.conf files.
For that i thought to define PI_SSID environment variable with different value for each Raspberry in bash file and use it in common hostapd.conf as SSID name.
What i've done so far?
In /home/pi/.bashrc i've added:
export PI_SSID=Razz01
In etc/sudoers i've added:
Defaults env_keep += "PI_SSID"
And in hostapd.conf i've set:
ssid=$PI_SSID
Problem:
After restart of Raspberry PI, its SSID name is "$PI_SSID", not "Razz01".
What i do wrong?
Is it possible at all to define raspberry SSID with environment variable? If yes how to do it?
I use Stretch raspbian.
/etc/rc.local
to do something likesed -i -s "s/^ssid=.*/ssid=$PI_SSID/" hostapd.conf
to differentiate the hostapd.conf files on startup.