lede/package/lean/luci-app-ssr-pro/root/etc/shadowsocksr/up-gfwlist.sh
2018-05-23 22:12:40 +08:00

22 lines
483 B
Bash
Executable File

#!/bin/sh
/etc/shadowsocksr/gen-gfwlist.sh > /tmp/ol-gfw.txt
if [ -s "/tmp/ol-gfw.txt" ];then
sort -u /etc/shadowsocksr/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/ssrpro restart