找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1393|回复: 6

小白求助,折腾IPTV,请帮忙写个openwrt自启动运行脚本,非常谢谢!

[复制链接]
如题,脚本实现功能是路由启动,ipset自动导入IPTV访问IP数据,用MWAN3实现分流,达到机顶盒破解后IPTV和上网融合。
create iptvhelper_default hash:net family inet hashsize 1024 maxelem 65536
add iptvhelper_default 125.74.70.0/24
add iptvhelper_default 182.254.118.0/24
add iptvhelper_default 124.202.138.0/24
add iptvhelper_default 202.100.69.0/24
add iptvhelper_default 183.57.48.0/24
add iptvhelper_default 123.151.72.0/24
add iptvhelper_default 114.67.228.0/24
add iptvhelper_default 116.196.82.0/24
add iptvhelper_default 182.254.116.0/24
add iptvhelper_default 140.205.162.0/24
add iptvhelper_default 123.56.177.0/24
add iptvhelper_default 140.205.160.0/24
add iptvhelper_default 119.28.28.0/24
add iptvhelper_default 192.168.2.0/24
add iptvhelper_default 216.58.200.0/24
add iptvhelper_default 114.67.234.0/24
add iptvhelper_default 116.196.100.0/24
add iptvhelper_default 60.164.91.0/24
add iptvhelper_default 175.25.50.0/24
add iptvhelper_default 119.29.29.0/24
add iptvhelper_default 239.255.255.0/24
add iptvhelper_default 116.196.114.0/24
add iptvhelper_default 116.196.95.0/24
add iptvhelper_default 224.0.0.0/24
add iptvhelper_default 117.121.49.0/24
add iptvhelper_default 121.46.30.0/24
add iptvhelper_default 60.164.104.0/24
add iptvhelper_default 43.247.88.0/24
add iptvhelper_default 123.151.79.0/24
add iptvhelper_default 116.196.120.0/24
add iptvhelper_default 116.196.84.0/24
add iptvhelper_default 116.196.106.0/24
add iptvhelper_default 140.205.203.0/24
add iptvhelper_default 10.10.10.0/24
add iptvhelper_default 239.255.30.0/24
add iptvhelper_default 123.151.26.0/24

自己弄了一个,手动启动可以导入,但不能启动自动运行。
#!/bin/sh /etc/rc.common
START=22
start() {
           ipset -R < /etc/iptv/iptvhelper_default.set
}


我的恩山、我的无线 The best wifi forum is right here.
主要吧这行 ipset -R < /etc/iptv/iptvhelper_default.set
放到 系统,启动项,本地启动脚本 里

点评

谢谢,是直接添加到etc/rc.local文件中吗?  详情 回复 发表于 2020-3-27 19:27
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
ip部分保存为iptvhelper_default.set,脚本命名为iptv,保存到/etc/init.d/,chmod +x授权后,输入/etc/init.d/iptv enable,不起作用。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
jjit 发表于 2020-3-27 19:16
主要吧这行 ipset -R < /etc/iptv/iptvhelper_default.set
放到 系统,启动项,本地启动脚本 里

谢谢,是直接添加到etc/rc.local文件中吗?

点评

是的..........  详情 回复 发表于 2020-3-27 19:39
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

minimova 发表于 2020-3-27 19:27
谢谢,是直接添加到etc/rc.local文件中吗?

是的..........

点评

非常感谢!试试看。  详情 回复 发表于 2020-3-27 19:41
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层

非常感谢!试试看。

点评

经测试,成功了,感谢!  详情 回复 发表于 2020-3-28 11:36
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
minimova 发表于 2020-3-27 19:41
非常感谢!试试看。

经测试,成功了,感谢!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 02:57

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表