Run shell script when interface comes up

I need to run a shell script the first time an interface comes up and connects to my wifi network.

I'm struggling to find a sensible way to facilitate this, any tips would be appreciated.

Create a hotplug script.

3 Likes

https://openwrt.org/docs/guide-user/base-system/hotplug

4 Likes

Thankyou @AndrewZ and @vgaetera I never knew about hotplug scripts. Learning everyday!