8853 questions

10512 answers

16486 comments

15817 members

0 votes
43 views 0 comments
by

I have a project where I turn the WiFi on and off by switching the state of the digital input.

I would like to know if the custom scripts can run all the time checking if WiFi is active or not to activate the digital output. It would be something as easy as this:

- If WiFi is activated, activate the digital output. 

- If WiFi is disabled, disable digital output.

1 Answer

0 votes
by
Hi,

You can write a scheduling task that would check if your WiFi is some kind of state and then execute your specific command on successful check:

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

EB.