Noobs installation. I've a script which needs to be run after a new WiFi connection is set. Is there any way to run this script automatically once we connect/set WiFi?
You can run
wpa_cli -a /home/pi/script_to_run_on_connect.sh
#!/bin/sh IFNAME=$1 CMD=$2 if [ "$CMD" = "CONNECTED" ]; then # do stuff on connect. fi if [ "$CMD" = "DISCONNECTED" ]; then # remove network configuration, if needed fi