Files
dotfiles/deprecated/hypr/scripts/vpnCheck
2023-12-04 09:44:54 +08:00

8 lines
262 B
Bash
Executable File

#!/bin/bash
if [ $(ip a s | grep tun0 | grep inet | awk '{print $2;}' | cut -d . -f2 | tr -d '\n' | wc -c) -eq 3 ]; then
echo "CBJ"
elif [ $(ip a s | grep tun0 | grep inet | awk '{print $2;}' | cut -d . -f2 | tr -d '\n' | wc -c) -eq 1 ]; then
echo "MLK"
fi