Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 0dec9be

Browse files
committed
improved get_addr func
1 parent a457130 commit 0dec9be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data/scripts/tinyproxy_wrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ until ip link show tun0 2>&1 | grep -qv "does not exist"; do
77
done
88

99
get_addr() {
10-
ip a show dev "$1" | grep inet | cut -d " " -f 6 | cut -d "/" -f 1 | tr '\n' ' ' | cut -d " " -f 1
10+
ip address show "$1" | grep 'inet ' | awk '{split($2, inet, "/"); print inet[1]}'
1111
}
1212

1313
addr_eth=${LISTEN_ON:-$(get_addr eth0)}

0 commit comments

Comments
 (0)