Created
December 14, 2018 17:13
-
-
Save sshimko/4ff71edd42dc4c3ed53d49c2068dfeff to your computer and use it in GitHub Desktop.
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 | |
# this is a pre-connect script for Tunnelblick that displays a bnner prior to connect and bails if the user clicks "Decline". | |
# adjust the banner as needed for your compliance requirements. | |
# NOTE: after you add pre-connect.sh to your tblk config directory you must attempt to connect once and then in the subsequent dialog that appears | |
# you must alloiw tunnelblick to access the System UI Server. | |
# | |
banner=" | |
You will be monitored. | |
If you are unauthorized or do not agree to the terms above, you are not permitted to use this system. | |
All your base are belong to us. | |
" | |
button=`/usr/bin/osascript -e "tell application \"SystemUIServer\" to display dialog \"$banner\" buttons {\"Accept\", \"Decline\" } with icon stop"` | |
if [ x"$button" == x"button returned:Decline" ]; then | |
/bin/echo "Monitor agreement declined. You must accept it to continue." | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment