Search code examples
linuxbashsshraspberry-piraspberry-pi-zero

How do I rfkill block wi-fi on my raspberry only for a few hours? (Only ssh access)


Right now I can only access my raspberry pi zero w via wifi but still I would like to block wifi for a few hours every day and then unblock it automatically so I can access the raspberry again.

Normally, one could just use rfkill to block and unblock but because I will not be able to log in when wi-fi is down, I will need a script to unblock wi-fi automatically after a few hours.

Is this possible?


Solution

  • use a cron-job or a systemd timer.