I have tried using the script in the URL above and im getting the following error. I have confirmed I can reach the URL from a browser by just using the URL bar. I have replaced our actual full URL with the word Redacted for the post
Script result: + ciscoAMPPath='/Applications/Cisco AMP/AMP for Endpoints Connector.app/Contents/Info.plist'
+ redirectingURL='https://console.amp.cisco.com/install_packages/REDACTED/download?product=MacProduct'
+ localInstallerVolume=/Volumes/ampmac_connector
+ localInstallerPackage=ciscoampmac_connector.pkg
+ tmpFolder=/Library/CiscoAMPtmp
+ checkAndGetURLs
++ curl --head 'https://console.amp.cisco.com/install_packages/REDACTED/download?product=MacProduct'
++ grep Location:
++ awk '{print $2}'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
+ dmgURL=
+ [[ -z '' ]]
+ echo 'Unable to retrieve DMG url. Exiting...'
Unable to retrieve DMG url. Exiting...
+ exit 1
needed to add -i to grep command