Skip to content

Instantly share code, notes, and snippets.

@patgmac
Last active May 28, 2021 15:45
Show Gist options
  • Save patgmac/44de5d7ca3a1ece67091039684d065fb to your computer and use it in GitHub Desktop.
Save patgmac/44de5d7ca3a1ece67091039684d065fb to your computer and use it in GitHub Desktop.
#!/bin/sh
# Netskope_BleedingEdge_Update.sh
# Purpose: This will update the Netskope client to the latest available from the <company> tenant.
# Updated: 05/24/2021
trigger="netskope"
tenant="tenant_name"
# check if Netskope is installed first
if [[ ! -e "/Applications/Netskope Client.app" ]]; then
echo "Netskope not present, installing"
/usr/local/bin/jamf policy -event $trigger
fi
curl https://download-$tenant.goskope.com/dlr/mac/get --output /tmp/nsclient.pkg
installer -pkg /tmp/nsclient.pkg -target /
rm -f /tmp/nsclient.pkg
installedVersion=$(defaults read /Applications/Netskope\ Client.app/Contents/Info.plist CFBundleShortVersionString)
echo "Netskope version $installedVersion now installed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment