mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 14:13:30 +00:00
luci-app-ssr-plus: speedup restart when server-node disable ping
This commit is contained in:
parent
c6b967d815
commit
0f4afd6233
@ -1,8 +1,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=152
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=153
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
@ -64,7 +64,7 @@ gen_config_file() {
|
||||
elif [ "$host" != "${host#*:[0-9a-fA-F]}" ]; then
|
||||
hostip=$host
|
||||
else
|
||||
hostip=$(ping $host -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1)
|
||||
hostip=$(ping $host -W 1 -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1)
|
||||
if echo $hostip | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then
|
||||
hostip=$hostip
|
||||
else
|
||||
@ -148,7 +148,7 @@ start_rules() {
|
||||
elif [ "$server" != "${server#*:[0-9a-fA-F]}" ]; then
|
||||
server=$server
|
||||
else
|
||||
server=$(ping $server -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1)
|
||||
server=$(ping $server -W 1 -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1)
|
||||
if echo $server | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then
|
||||
echo $server >/etc/ssr_ip
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user