I have already set up DietPi on a Raspi 3 b+, installed optimized Softwae: Wifi Hotspot, Chrome Kiosk mode, LLMP stack.
In addition I assembled a 7zoll touchsceen to it. I created a nice dashboard with some interesting information. So when I boot up, i want to generate a new Wifi Key and display it on the touchscreen (behind a button).
I placed a tiny script in rc.local:
Code: Select all
# Filemanipulation
key=$(openssl rand -base64 15)
sed -i "s/SOFTWARE_WIFI_HOTSPOT_KEY=.*$/SOFTWARE_WIFI_HOTSPOT_KEY=$key/" /DietPi/dietpi.txt
sed -i "s/wpa_passphrase=.*$/wpa_passphrase=$key/" /etc/hostapd/hostapd.conf
# Restat hostapd service
service hostapd stop
service hostapd start
I really now get crazy because I don't know where I can put the generated key. Can somebody please give me a hint? I assume those two files I maniplate are not the correct ones... but which are they?