Skip to content

Instantly share code, notes, and snippets.

@yehgdotnet
Created May 23, 2021 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yehgdotnet/f59be4af163d3aa1aeb789e5075a7fc0 to your computer and use it in GitHub Desktop.
Save yehgdotnet/f59be4af163d3aa1aeb789e5075a7fc0 to your computer and use it in GitHub Desktop.
Is VPN active?
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
@yehgdotnet
Copy link
Author

Use with

RHEL / CentOS

yum –y install bmon

Debian / Ubuntu

sudo apt-get install bmon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment