We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df0dffb commit abf8ffdCopy full SHA for abf8ffd
termux/setup
@@ -49,7 +49,7 @@ pkill sshd || true
49
sshd
50
51
# Get the device's IP address
52
-IP_ADDRESS=$(ifconfig 2>/dev/null | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -n 1)
+IP_ADDRESS=$(ifconfig 2>/dev/null | grep -A1 wlan0 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -n 1)
53
54
# Get username
55
USERNAME=$(whoami)
0 commit comments