Automatic Wpa Supplicant restart

If wifi connection used by your Linux box is not stable and goes up&down, with wpa_supplicant requiring some manual restart you could use a simple script that does it for you.

Below you can find a script i’m using on a RaspberryPi 3 with Raspian installed.

Remember to use a value for WLAN corresponding to you wifi interface.

The shell script alone doesn’t give you a fully automatic and periodic check&restart … to have it you should use crontab and schedule script invocation (user: root!) every 15 minutes (or every time you need it).

Leave a comment