12 lines
197 B
Bash
Executable file
12 lines
197 B
Bash
Executable file
#!/bin/bash
|
|
|
|
LABEL_VPN=${LABEL_VPN:-VPN}
|
|
LABEL_IP=${LABEL_IP:-IP}
|
|
|
|
ip="$(curl ifconfig.me)"
|
|
|
|
if ip link show tun0 >/dev/null 2>&1; then
|
|
echo "${LABEL_VPN}$ip"
|
|
else
|
|
echo "${LABEL_IP}$ip"
|
|
fi
|