dotfiles/.scripts/other/vpn-check.sh

9 lines
258 B
Bash
Raw Normal View History

2020-09-24 21:18:11 -07:00
#!/usr/bin/env zsh
function yes() { echo "You are connected to VPN." }
function no() { echo "You are NOT connected to VPN!" }
[[ "$(wget https://www.privateinternetaccess.com -O - -q | grep 'You are protected by PIA' | cut -c 42-65)" ]] && yes || no
exit