Skip to content

Instantly share code, notes, and snippets.

@janosroden
Created May 8, 2018 16:21
Show Gist options
  • Save janosroden/f80d4d55c8f2dd9e4cc467ffb04eff23 to your computer and use it in GitHub Desktop.
Save janosroden/f80d4d55c8f2dd9e4cc467ffb04eff23 to your computer and use it in GitHub Desktop.
#!/bin/bash
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:"
if ping -c3 ilo.blacksalt.cloud | grep -q "3 packets transmitted, 0 received"; then
poff myvpn > /dev/null || true
pon myvpn
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment