diff --git a/luci-app-bypass/root/etc/init.d/bypass b/luci-app-bypass/root/etc/init.d/bypass index e2ab96e28..0ee0f9d07 100755 --- a/luci-app-bypass/root/etc/init.d/bypass +++ b/luci-app-bypass/root/etc/init.d/bypass @@ -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 diff --git a/luci-app-bypass/root/usr/share/bypass/update b/luci-app-bypass/root/usr/share/bypass/update index de550af15..a91f6c0d7 100755 --- a/luci-app-bypass/root/usr/share/bypass/update +++ b/luci-app-bypass/root/usr/share/bypass/update @@ -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 \ No newline at end of file +[ "$1" == "restart" ] && /etc/init.d/bypass restart update || /etc/init.d/bypass start updated \ No newline at end of file