英文:
How do I rfkill block wi-fi on my raspberry only for a few hours? (Only ssh access)
问题
现在我只能通过Wi-Fi访问我的树莓派Zero W,但我仍然想每天封锁几个小时的Wi-Fi,然后自动解锁,以便我可以再次访问树莓派。
通常,可以使用rfkill来封锁和解锁,但因为当Wi-Fi关闭时我将无法登录,所以我需要一个脚本来在几个小时后自动解锁Wi-Fi。
这可行吗?
英文:
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?
答案1
得分: 0
使用 cron 作业或 systemd 定时器。
英文:
use a cron-job or a systemd timer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论