scripts-github-mirror/net/wireless/README.md

33 lines
1015 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#openwrt无线客户端切换辅助脚本
##场景
使用 openwrt 迷你路由器作为客户端连接网络后再共享出一个WiFi热点可以方便的当作无线中继使用。在路由中安装一些特别的应用后更可以做很多有意思的事情。但是离开这个区域后进入不含有当前已连接的WiFi则可能导致路由器不能正常启动。
比如在办公室连接到名为work的热点回家后连接到名为home的热点路由器不能自动的切换只能配置一个客户端。所以写了这个辅助脚本来自动切换接入的热点。
##配置
配置 `wireless.conf`文件,添加热点名称和密码,用 `:`隔开。内容示例如下:
```
essids=(
"work:12345678"
"HUAZHU-Hanting:"
"home:test1234"
)
```
如果为开放的无密码热点,则冒号后留空。
##运行
注意需要依赖 `bash`
```
/root/bin/wireless.sh
```
*cron 定时任务*
```
*/3 * * * * bash /root/bin/wireless.sh >> /var/log/wireless.log 2>&1
```