DietPi v10.4.2
I have a script in /etc which gets 2 arguments, interface (wlan0) and event (CONNECTED) from wpa_cli
I can manually call the script
wpa_cli -i wlan0 -a /etc/wlan0_connected.sh -B
and it works, it calls my script, passes the 2 args, and the script does it’s thing (writes to log files)…
Now, how do I create a service, to start the wpa_cli cmd on startup, so when the rpiz2w is rebooted it will be monitoring the wlan0 interface and logging the connected disconnect events?
i tried creating a service, but status shows:
RPIZ2W_wlan0_up.service: Deactivated successfully.
changed Type=simple to forking, that did not stop it from being deactivated…
thanks