-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.完善参数配置文件数据读写自动纠错机制。
- Loading branch information
Showing
14 changed files
with
223 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# install.sh v4.4.0 | ||
# install.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
# LZ RULE script for Asuswrt-Merlin Router | ||
|
@@ -11,7 +11,7 @@ | |
|
||
#BEIGIN | ||
|
||
LZ_VERSION=v4.4.0 | ||
LZ_VERSION=v4.4.1 | ||
TIMEOUT=10 | ||
CURRENT_PATH="${0%/*}" | ||
[ "${CURRENT_PATH:0:1}" != '/' ] && CURRENT_PATH="$( pwd )${CURRENT_PATH#*.}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
v4.4.1 (2024/5/29) | ||
1.完善参数配置文件数据读写自动纠错机制。 | ||
|
||
v4.4.0 (2024/5/25) | ||
1.强化参数配置文件数据读取纠错机制。 | ||
2.更新运营商 IP 地址数据文件。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule_config.sh v4.4.0 | ||
# lz_rule_config.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
# 本软件采用CIDR(无类别域间路由,Classless Inter-Domain Routing)技术,是一个在Internet上创建附加地 | ||
|
@@ -173,7 +173,6 @@ unicom_cnc_wan_port=0 | |
## 中国移动IPv4目标网段流量出口(网段数据文件:cmcc_cidr.txt) | ||
## 0--第一WAN口;1--第二WAN口;2--均分出口;3--反向均分出口;>3--自动分配出口;取值范围:0~9 | ||
## 缺省为第二WAN口(1)。 | ||
## 1:表示对中国移动网段的访问使用第二AN口。 | ||
cmcc_wan_port=1 | ||
|
||
## 中国铁通IPv4目标网段流量出口(网段数据文件:crtc_cidr.txt) | ||
|
@@ -866,7 +865,7 @@ wan2_udpxy_port=8888 | |
wan2_udpxy_buffer=65536 | ||
|
||
## 第二WAN口UDPXY代理支持的内网客户端数量 | ||
##取值范围:1~5000 | ||
## 取值范围:1~5000 | ||
## 缺省为10。 | ||
wan2_udpxy_client_num=10 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_clear_custom_scripts_data.sh v4.4.0 | ||
# lz_clear_custom_scripts_data.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 清除用户自定义脚本数据 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_define_global_variables.sh v4.4.0 | ||
# lz_define_global_variables.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
# QnkgTFog5aaZ5aaZ5ZGc77yI6Juk6J+G5aKp5YS/77yJ(首次运行标识,切勿修改) | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule_address_query.sh v4.4.0 | ||
# lz_rule_address_query.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 网址信息查询脚本 | ||
|
@@ -746,7 +746,7 @@ lz_aq_get_box_data() { | |
i["aq_high_wan_1_src_to_dst_addr_port_file"]=pathd"/high_wan_1_src_to_dst_addr_port.txt"; | ||
i["aq_usage_mode"]=0; | ||
total=length(i); | ||
} $1 ~ /^lz_config_[a-zA-Z0-9]+/ { | ||
} $0 ~ /^[[:space:]]*lz_config_[[:alnum:]_]+[=]/ { | ||
flag=0; | ||
if ($1 == "lz_config_all_foreign_wan_port") | ||
key="aq_isp_wan_port_0"; | ||
|
@@ -775,7 +775,7 @@ lz_aq_get_box_data() { | |
sub(/^lz_config_/, "aq_", key); | ||
} | ||
value=$2; | ||
gsub(/[ \t#].*$/, "", value); | ||
gsub(/[[:space:]#].*$/, "", value); | ||
invalid=0; | ||
if (key == "aq_version") { | ||
flag=1; | ||
|
@@ -855,7 +855,7 @@ lz_aq_get_box_data() { | |
|| key == "aq_wan_2_src_to_dst_addr_port_file" \ | ||
|| key == "aq_high_wan_1_src_to_dst_addr_port_file") { | ||
flag=2; | ||
if ((value !~ /^[\"]([\/][a-zA-Z0-9_\-][a-zA-Z0-9_\.\-]*)+[\"]$/ && value !~ /^([\/][a-zA-Z0-9_\-][a-zA-Z0-9_\.\-]*)+$/) \ | ||
if ((value !~ /^[\"]([\/][[:alnum:]_\-][[:alnum:]_\.\-]*)+[\"]$/ && value !~ /^([\/][[:alnum:]_\-][[:alnum:]_\.\-]*)+$/) \ | ||
|| value ~ /[\/][\/]/) | ||
invalid=2; | ||
} | ||
|
@@ -973,26 +973,26 @@ lz_aq_get_static_policy_wan_port() { | |
## IPv4网络IP地址^_域名^_DNS服务器地址^_DNS服务器名称 | ||
lz_aq_resolve_ip() { | ||
local local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' \ | ||
-e 's/\(^.*[^ ]\)[ ]*$/\1/g' -e '/[3-9][0-9][0-9]/d' -e '/[2][6-9][0-9]/d' \ | ||
-e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' -e '/[3-9][0-9][0-9]/d' -e '/[2][6-9][0-9]/d' \ | ||
-e '/[2][5][6-9]/d' -e 's/\/.*$//g' \ | ||
| grep -Eo '^([0-9]{1,3}[\.]){3}[0-9]{1,3}$' | sed -n 1p )" | ||
local local_domain_name="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' \ | ||
-e 's/\(^.*[^ ]\)[ ]*$/\1/g' -e 's/^.*\:\/\///g' -e 's/^[^ ]\{0,6\}\://g' \ | ||
-e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' -e 's/^.*\:\/\///g' -e 's/^[^[:space:]]\{0,6\}\://g' \ | ||
-e 's/\/.*$//g' | sed -n 1p | tr '[:A-Z:]' '[:a-z:]' )" | ||
local local_dns_server_ip="" | ||
local local_dns_server_name="" | ||
if [ "${local_ip}" = "${local_domain_name}" ]; then | ||
local_domain_name="" | ||
[ -z "${local_ip}" ] && local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' \ | ||
-e 's/\(^.*[^ ]\)[ ]*$/\1/g' | sed -n 1p | tr '[:A-Z:]' '[:a-z:]' )" | ||
-e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' | sed -n 1p | tr '[:A-Z:]' '[:a-z:]' )" | ||
else | ||
local local_dnslookup_server="$( echo "${2}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' \ | ||
-e 's/[[:space:]]\+/ /g' \ | ||
-e 's/\(^.*[^ ]\)[ ]*$/\1/g' \ | ||
-e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' \ | ||
-e '/[3-9][0-9][0-9]/d' -e '/[2][6-9][0-9]/d' \ | ||
-e '/[2][5][6-9]/d' -e 's/\/.*$//g' \ | ||
| grep -Eo '^([0-9]{1,3}[\.]){3}[0-9]{1,3}$' | sed -n 1p )" | ||
if ! echo "${local_domain_name}" | grep -qEo "[ ]"; then | ||
if ! echo "${local_domain_name}" | grep -qEo "[[:space:]]"; then | ||
local local_info= | ||
if [ -z "${local_dnslookup_server}" ]; then | ||
local_info="$( nslookup "${local_domain_name}" 2> /dev/null )" | ||
|
@@ -1005,21 +1005,21 @@ lz_aq_resolve_ip() { | |
[ -z "${local_domain_name}" ] && local_domain_name="$( echo "${1}" \ | ||
| sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' \ | ||
-e 's/[[:space:]]\+/ /g' \ | ||
-e 's/\(^.*[^ ]\)[ ]*$/\1/g' \ | ||
-e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' \ | ||
-e 's/^.*\:\/\///g' \ | ||
-e 's/^[^ ]\{0,6\}\://g' \ | ||
-e 's/^[^[:space:]]\{0,6\}\://g' \ | ||
-e 's/\/.*$//g' \ | ||
| tr '[:A-Z:]' '[:a-z:]' )" | ||
local_dns_server_ip="$( echo "${local_info}" | sed -n 2p | awk '{print $3}' | tr '[:A-Z:]' '[:a-z:]' )" | ||
local_dns_server_name="$( echo "${local_info}" | sed -n 2p | awk '{print $4}' \ | ||
| sed 's/[\.]$//g' | tr '[:A-Z:]' '[:a-z:]' )" | ||
[ -z "${local_ip}" ] && { | ||
local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^ ]\)[ ]*$/\1/g' \ | ||
local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' \ | ||
| sed -n 1p | tr '[:A-Z:]' '[:a-z:]' )" | ||
local_domain_name="" | ||
} | ||
else | ||
local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^ ]\)[ ]*$/\1/g' \ | ||
local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' \ | ||
| sed -n 1p | tr '[:A-Z:]' '[:a-z:]' )" | ||
local_domain_name="" | ||
fi | ||
|
@@ -1072,7 +1072,7 @@ lz_show_address_info() { | |
fi | ||
elif [ "${3}" = "$(( AQ_ISP_TOTAL + 4 ))" ]; then | ||
echo "$(lzdate)" [$$]: " Private network address" | tee -ai "${ADDRESS_LOG}" 2> /dev/null | ||
elif echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^ ]\)[ ]*$/\1/g' \ | ||
elif echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' \ | ||
-e '/[3-9][0-9][0-9]/d' -e '/[2][6-9][0-9]/d' -e '/[2][5][6-9]/d' -e 's/\/.*$//g' \ | ||
| grep -qEo '^([0-9]{1,3}[\.]){3}[0-9]{1,3}$'; then | ||
if [ "${2}" = "0" ]; then | ||
|
@@ -1164,7 +1164,7 @@ lz_query_address() { | |
local local_ip_item_total="$( echo "${local_net_ip}" | wc -l )" | ||
|
||
if [ "${local_ip_item_total}" -le "1" ]; then | ||
if echo "${local_net_ip}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^ ]\)[ ]*$/\1/g' \ | ||
if echo "${local_net_ip}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^[:space:]]\)[[:space:]]*$/\1/g' \ | ||
-e '/[3-9][0-9][0-9]/d' -e '/[2][6-9][0-9]/d' -e '/[2][5][6-9]/d' -e 's/\/.*$//g' \ | ||
| grep -qEo '^([0-9]{1,3}[\.]){3}[0-9]{1,3}$'; then | ||
ipset -q flush lz_aq_ispip_tmp_sets && ipset -q destroy lz_aq_ispip_tmp_sets | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/bin/sh | ||
# lz_rule_func.sh v4.4.0 | ||
# lz_rule_func.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
#BEIGIN | ||
|
||
# shellcheck source=/dev/null | ||
# shellcheck disable=SC2034 # Unused variables left for readability | ||
# shellcheck disable=SC2153 | ||
# shellcheck disable=SC2154 | ||
# shellcheck disable=SC3051 | ||
|
||
|
@@ -115,9 +116,9 @@ lz_get_custom_hosts_file_item_total() { | |
## 返回值: | ||
## 域名地址条目列表 | ||
lz_get_domain_list() { | ||
sed -e "s/\'//g" -e 's/\"//g' -e 's/[[:space:]]\+/ /g' -e 's/^[ ]*//g' -e '/^[#]/d' -e 's/[#].*$//g' -e 's/^\([^ ]*\).*$/\1/g' \ | ||
-e 's/^[^ ]*[\:][\/][\/]//g' -e 's/^[^ ]\{0,6\}[\:]//g' -e 's/[\/].*$//g' -e 's/[ ].*$//g' -e '/^[\.]/d' \ | ||
-e '/^[ ]*$/d' "${1}" 2> /dev/null | tr '[:A-Z:]' '[:a-z:]' | ||
sed -e "s/\'//g" -e 's/\"//g' -e 's/[[:space:]]\+/ /g' -e 's/^[[:space:]]*//g' -e '/^[#]/d' -e 's/[#].*$//g' -e 's/^\([^[:space:]]*\).*$/\1/g' \ | ||
-e 's/^[^[:space:]]*[\:][\/][\/]//g' -e 's/^[^[:space:]]\{0,6\}[\:]//g' -e 's/[\/].*$//g' -e 's/[[:space:]].*$//g' -e '/^[\.]/d' \ | ||
-e '/^[[:space:]]*$/d' "${1}" 2> /dev/null | tr '[:A-Z:]' '[:a-z:]' | ||
} | ||
|
||
## 获取WAN口域名地址条目列表数据文件总有效条目数函数 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule_status.sh v4.4.0 | ||
# lz_rule_status.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 显示脚本运行状态脚本 | ||
|
@@ -211,9 +211,9 @@ lz_get_custom_hosts_file_item_total_status() { | |
lz_get_domain_data_file_item_total_status() { | ||
local retval="0" | ||
[ -f "${1}" ] && { | ||
retval="$( sed -e "s/\'//g" -e 's/\"//g' -e 's/[[:space:]]\+/ /g' -e 's/^[ ]*//g' -e '/^[#]/d' -e 's/[#].*$//g' -e 's/^\([^ ]*\).*$/\1/g' \ | ||
-e 's/^[^ ]*[\:][\/][\/]//g' -e 's/^[^ ]\{0,6\}[\:]//g' -e 's/[\/].*$//g' -e 's/[ ].*$//g' -e '/^[\.]/d' \ | ||
-e '/^[ ]*$/d' "${1}" 2> /dev/null | tr '[:A-Z:]' '[:a-z:]' | awk -v count="0" 'NF >= "1" && !i[$1]++ {count++} END{print count}' )" | ||
retval="$( sed -e "s/\'//g" -e 's/\"//g' -e 's/[[:space:]]\+/ /g' -e 's/^[[:space:]]*//g' -e '/^[#]/d' -e 's/[#].*$//g' -e 's/^\([^[:space:]]*\).*$/\1/g' \ | ||
-e 's/^[^[:space:]]*[\:][\/][\/]//g' -e 's/^[^[:space:]]\{0,6\}[\:]//g' -e 's/[\/].*$//g' -e 's/[[:space:]].*$//g' -e '/^[\.]/d' \ | ||
-e '/^[[:space:]]*$/d' "${1}" 2> /dev/null | tr '[:A-Z:]' '[:a-z:]' | awk -v count="0" 'NF >= "1" && !i[$1]++ {count++} END{print count}' )" | ||
} | ||
echo "${retval}" | ||
} | ||
|
@@ -601,7 +601,7 @@ lz_get_box_data_status() { | |
i["status_custom_dualwan_scripts"]=5; | ||
i["status_custom_dualwan_scripts_filename"]=pathd"/custom_dualwan_scripts.sh"; | ||
total=length(i); | ||
} $1 ~ /^lz_config_[a-zA-Z0-9]+/ { | ||
} $0 ~ /^[[:space:]]*lz_config_[[:alnum:]_]+[=]/ { | ||
flag=0; | ||
if ($1 == "lz_config_all_foreign_wan_port") | ||
key="status_isp_wan_port_0"; | ||
|
@@ -630,7 +630,7 @@ lz_get_box_data_status() { | |
sub(/^lz_config_/, "status_", key); | ||
} | ||
value=$2; | ||
gsub(/[ \t#].*$/, "", value); | ||
gsub(/[[:space:]#].*$/, "", value); | ||
invalid=0; | ||
if (key == "status_version") { | ||
flag=1; | ||
|
@@ -758,7 +758,7 @@ lz_get_box_data_status() { | |
|| key == "status_custom_config_scripts_filename" \ | ||
|| key == "status_custom_dualwan_scripts_filename") { | ||
flag=2; | ||
if ((value !~ /^[\"]([\/][a-zA-Z0-9_\-][a-zA-Z0-9_\.\-]*)+[\"]$/ && value !~ /^([\/][a-zA-Z0-9_\-][a-zA-Z0-9_\.\-]*)+$/) \ | ||
if ((value !~ /^[\"]([\/][[:alnum:]_\-][[:alnum:]_\.\-]*)+[\"]$/ && value !~ /^([\/][[:alnum:]_\-][[:alnum:]_\.\-]*)+$/) \ | ||
|| value ~ /[\/][\/]/) | ||
invalid=2; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_vpn_daemon.sh v4.4.0 | ||
# lz_vpn_daemon.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 虚拟专网客户端路由刷新处理后台守护进程脚本 | ||
|
@@ -9,7 +9,7 @@ | |
|
||
#BEIGIN | ||
## 版本号 | ||
LZ_VERSION=v4.4.0 | ||
LZ_VERSION=v4.4.1 | ||
|
||
## 项目接口文件部署路径 | ||
PATH_INTERFACE="${0%/*}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule_service.sh v4.4.0 | ||
# lz_rule_service.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 服务接口脚本 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
# lz_policy_routing.js v4.4.0 | ||
# lz_policy_routing.js v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
# LZ JavaScript for Asuswrt-Merlin Router | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule.sh v4.4.0 | ||
# lz_rule.sh v4.4.1 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
# 本软件采用CIDR(无类别域间路由,Classless Inter-Domain Routing)技术,是一个在Internet上创建附加地 | ||
|
@@ -80,7 +80,7 @@ | |
## -------------全局数据定义及初始化------------------- | ||
|
||
## 版本号 | ||
LZ_VERSION=v4.4.0 | ||
LZ_VERSION=v4.4.1 | ||
|
||
## 运行状态查询命令 | ||
SHOW_STATUS="status" | ||
|
@@ -1228,11 +1228,11 @@ __lz_main() { | |
|
||
drop_sys_caches=0 | ||
if [ -f "${PATH_CONFIGS}/lz_rule_config.box" ]; then | ||
eval "$( awk -F "=" '$1 == "lz_config_drop_sys_caches" { | ||
eval "$( awk -F "=" '$0 ~ /^[[:space:]]*lz_config_[[:alnum:]_]+[=]/ && $1 == "lz_config_drop_sys_caches" { | ||
key=$1; | ||
sub(/^lz_config_/, "", key); | ||
value=$2; | ||
gsub(/[ \t#].*$/, "", value); | ||
gsub(/[[:space:]#].*$/, "", value); | ||
if (value !~ /^[0-9]$/) | ||
value=0 | ||
print key"="value; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# uninstall.sh v4.4.0 | ||
# uninstall.sh v4.4.1 | ||
# By LZ ([email protected]) | ||
|
||
# LZ RULE script for Asuswrt-Merlin Router | ||
|
@@ -8,7 +8,7 @@ | |
|
||
# BEIGIN | ||
|
||
LZ_VERSION=v4.4.0 | ||
LZ_VERSION=v4.4.1 | ||
TIMEOUT=10 | ||
CURRENT_PATH="${0%/*}" | ||
[ "${CURRENT_PATH:0:1}" != '/' ] && CURRENT_PATH="$( pwd )${CURRENT_PATH#*.}" | ||
|