Created
May 23, 2021 07:32
-
-
Save yehgdotnet/f59be4af163d3aa1aeb789e5075a7fc0 to your computer and use it in GitHub Desktop.
Is VPN active?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true | |
do | |
sudo ifconfig tun0 &> /dev/null && echo -e "\033[1;32m" "-- VPN is active --" "\033[0m" | |
sudo ifconfig tun0 &> /dev/null || echo -e "\033[1;31m" "-- VPN is NOT active --" "\033[0m" | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use with
RHEL / CentOS
yum –y install bmon
Debian / Ubuntu
sudo apt-get install bmon