-
-
Save yurrriq/c0b7f3f9f38bc3f5483b945d898f79a0 to your computer and use it in GitHub Desktop.
openconnect launchd
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/bash | |
# /etc/openconnect_wrapper | |
# swap out SIGTERM for openconnect-friendly SIGINT | |
_term() { | |
kill -INT "$child" 2>/dev/null | |
} | |
trap _term SIGTERM | |
cat | /usr/local/bin/openconnect "$@" & | |
child=$! | |
wait "$child" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> <true/> | |
<key>Label</key> <string>vpn.openconnect</string> | |
<key>StandardInPath</key> <string>/etc/vpn_secret</string> | |
<key>RunAtLoad</key> <true/> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/etc/openconnect_wrapper</string> | |
<string>--authgroup=__AUTHGROUP__</string> | |
<string>--user=__USER__</string> | |
<string>__VPN_URL__</string> | |
</array> | |
</dict> | |
</plist> |
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
My_Pa$sW0rd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment