Created
March 8, 2023 13:11
-
-
Save pyther/95b6da03b530962cf661e534f6680663 to your computer and use it in GitHub Desktop.
This file contains 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
% cat globalprotect_preinstall.sh | |
#!/bin/sh | |
# | |
# PLIST Configuration from https://docs.paloaltonetworks.com/globalprotect/10-1/globalprotect-admin/mobile-endpoint-management/manage-the-globalprotect-app-using-jamf/deploy-the-globalprotect-mobile-app-using-jamf | |
PORTAL=vpn1.acme.corp | |
PLIST="/Library/Preferences/com.paloaltonetworks.GlobalProtect.settings.plist" | |
if [[ -f $PLIST ]]; then | |
echo "WARNING: $PLIST already exists. Skipping." | |
exit 0 | |
fi | |
cat <<EOF > $PLIST | |
<?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>Palo Alto Networks</key> | |
<dict> | |
<key>GlobalProtect</key> | |
<dict> | |
<key>PanSetup</key> | |
<dict> | |
<key>Portal</key> | |
<string>${PORTAL}</string> | |
<key>Prelogon</key> | |
<string>0</string> | |
</dict> | |
<key>Settings</key> | |
<dict> | |
<key>connect-method</key> | |
<string>on-demand</string> | |
</dict> | |
</dict> | |
</dict> | |
</dict> | |
</plist> | |
EOF | |
% ./to_plist.sh Applications/com.paloaltonetworks.GlobalProtect.client.plist.json | |
<?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>PanPortalList</key> | |
<array> | |
<string>vpn1.acme.corp</string> | |
<string>vpn2.acme.corp</string> | |
<string>vpn3.acme.corp</string> | |
</array> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment