luci: optimize

This commit is contained in:
lwb1978 2025-03-24 20:06:20 +08:00 committed by xiaorouji
parent 0e79d37525
commit 4a81ac3e56

View File

@ -8,7 +8,7 @@ server_port=$4
probe_file="/tmp/etc/passwall2/haproxy/Probe_URL"
probeUrl="https://www.google.com/generate_204"
if [ -f "$probe_file" ]; then
firstLine=$(head -n 1 "$probe_file" | tr -d ' \t')
firstLine=$(head -n 1 "$probe_file" | tr -d ' \t\n')
[ -n "$firstLine" ] && probeUrl="$firstLine"
fi