Created
March 26, 2018 21:19
-
-
Save cimm/6fb983f0c17c5c16bdf7eac81ad449d4 to your computer and use it in GitHub Desktop.
Intended to run in cron, a little nudge to warn me to turn on my VPN
This file contains hidden or 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
#!/bin/sh | |
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)"; | |
if /sbin/ifconfig tun0; then | |
echo "VPN is active"; | |
else | |
DISPLAY=:0 notify-send "VPN is not active" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment