mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-06 23:08:07 +08:00
update-03.08
This commit is contained in:
@@ -27,16 +27,10 @@ smartdns_flag=0
|
||||
chinadns_flag=0
|
||||
local_enable=0
|
||||
switch_enable=0
|
||||
switch_server=$1
|
||||
[[ "$1" == update* ]] && update=$1 || switch_server=$1
|
||||
server_count=0
|
||||
STATUS=Y
|
||||
|
||||
extra_command "updated" ""
|
||||
|
||||
updated() {
|
||||
updated=Y
|
||||
start
|
||||
}
|
||||
uci_get_by_name(){
|
||||
ret=$(uci -q get $NAME.$1.$2)
|
||||
echo ${ret:=$3}
|
||||
@@ -259,7 +253,7 @@ rules(){
|
||||
check_net
|
||||
cat $LOG 2>/dev/null | sed -n '$p' | grep -q 'Download IP/GFW files...' || (log "Check IP/GFW files...")
|
||||
mkdir -p /var/run $VAR
|
||||
if [[ ! -f $PID && "$updated" != Y ]];then
|
||||
if [[ ! -f $PID && "$update" != "updated" ]] || [ "$update" == "update" ] ;then
|
||||
log "Download IP/GFW files..."
|
||||
firstdown 2;exit 0;
|
||||
fi
|
||||
|
||||
@@ -28,7 +28,7 @@ if [ "$C" = router ];then
|
||||
else
|
||||
log "China IPv4 List is up to date!"
|
||||
fi
|
||||
ipset list china_v4 >/dev/null 2>&1 && $DIR/chinaipset
|
||||
#ipset list china_v4 >/dev/null 2>&1 && $DIR/chinaipset
|
||||
|
||||
if [ ! -f $T_FILE/china_v6.txt ];then
|
||||
while ! D=$(curl -kLfsm 3 https://ispip.clang.cn/all_cn_ipv6.txt || curl -kLfsm 3 https://op.supes.top/all_cn_ipv6.txt);do
|
||||
@@ -44,7 +44,7 @@ if [ "$C" = router ];then
|
||||
else
|
||||
log "China IPv6 List is up to date!"
|
||||
fi
|
||||
ipset list china_v6 >/dev/null 2>&1 && $DIR/chinaipset v6
|
||||
#ipset list china_v6 >/dev/null 2>&1 && $DIR/chinaipset v6
|
||||
fi
|
||||
|
||||
if [ "$C" = gfw -o "$(uci -q get bypass.@global[0].gfw_mode)" = 1 ];then
|
||||
@@ -66,4 +66,4 @@ fi
|
||||
|
||||
rm -f $LOCK /tmp/china*.txt /tmp/gfwnew.txt
|
||||
|
||||
[ "$1" == "restart" ] && /etc/init.d/bypass restart || /etc/init.d/bypass updated
|
||||
[ "$1" == "restart" ] && /etc/init.d/bypass restart update || /etc/init.d/bypass start updated
|
||||
Reference in New Issue
Block a user