luci-app-passwall: sync with upstream source

This commit is contained in:
CN_SZTL 2020-02-21 02:05:02 +08:00
parent 7785e478fc
commit 9edeeaf272
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -202,8 +202,8 @@ function ping_node()
local interface = luci.sys.exec(
"echo -n $(route | grep default | awk '{print $NF}')")
e.ping = luci.sys.exec(string.format(
"echo -n $(tcping -c 1 -i 1 -I %s -p %s %s 2>&1 | grep 'SYN/ACK' | grep -o 'time=[0-9]*' | awk -F '=' '{print$2}')",
interface, port, address))
"echo -n $(tcping -c 1 -i 1 -p %s %s 2>&1 | grep 'SYN/ACK' | grep -o 'time=[0-9]*' | awk -F '=' '{print$2}')",
port, address))
else
e.ping = luci.sys.exec(
"echo -n `ping -c 1 -W 1 %q 2>&1 | grep -o 'time=[0-9]*' | awk -F '=' '{print$2}'`" %