lede/package/lean/luci-app-v2ray-pro/root/etc/v2ray/up-gfwlist.sh
2018-09-19 22:52:17 +08:00

21 lines
471 B
Bash
Executable File

#!/bin/sh
/etc/v2ray/gen-gfwlist.sh > /tmp/ol-gfw.txt
if [ -s "/tmp/ol-gfw.txt" ];then
sort -u /etc/v2ray/base-gfwlist.txt /tmp/ol-gfw.txt > /tmp/china-banned
if ( ! cmp -s /tmp/china-banned /etc/gfwlist/china-banned );then
if [ -s "/tmp/china-banned" ];then
mv /tmp/china-banned /etc/gfwlist/china-banned
echo "Update GFW-List Done!"
fi
else
echo "GFW-List No Change!"
fi
fi
rm -f /tmp/gfwlist.txt
rm -f /tmp/ol-gfw.txt
/etc/init.d/v2raypro restart