Check out iJake's post in this discussion Posted on 02-05-2020 09:36 AM .
https://community.jamf.com/t5/jamf-pro/deploying-cisco-amp-v-1-9/td-p/213222
I've deployed via this script method and it works great
Check out iJake's post in this discussion Posted on 02-05-2020 09:36 AM .
https://community.jamf.com/t5/jamf-pro/deploying-cisco-amp-v-1-9/td-p/213222
I've deployed via this script method and it works great
Thank you @cvangorp. I am not well versed in scripting so I'm sure I'm missing something. I copied the script as edited by @ubcoit into Jamf.
edited redirectingURL="$4" to redirectingURL="$My URL for connector from the Cisco Console"
Created a policy to deploy it. The only payload in the policy is the script.
I get this error:
Executing Policy Cisco AMP for Endpoints - Install via Script
Running script Cisco AMP for Endpoints - Deploy via Script...
Script exit code: 1
Script result: + ciscoAMPPath='/Applications/Cisco AMP/AMP for Endpoints Connector.app/Contents/Info.plist'
+ redirectingURL='://My URL for connector from the Cisco Console'
+ localInstallerVolume=/Volumes/ampmac_connector
+ localInstallerPackage=ciscoampmac_connector.pkg
+ tmpFolder=/Library/CiscoAMPtmp
+ checkAndGetURLs
++ curl --head '://My URL for connector from the Cisco Console'
++ grep Location:
++ awk '{print $2}'
curl: (1) Protocol "" not supported or disabled in libcurl
+ dmgURL=
+ + -z '' ]]+ echo 'Unable to retrieve DMG url. Exiting...'
Unable to retrieve DMG url. Exiting...
+ exit 1
Error running script: return code was 1.
The error suggests to me that the script is unable to pull the .dmg file (?), but I tested the URL and I am able to download the connector using a web browser.
Any idea what's going on?
Thanks for your help, I appreciate it.
You shouldn't have to edit the script at all. Yes @ubcoit script is what I am using. I would leave $4 in the script this allows you to have separate jamf policies if you have separate amp(now cisco secure) policies (groups) and thus use 1 script in multiple policies just changing the URL.
You paste your URL (from download connector) in the policy in box parameter 4 box see my screenshot.

Did you verify that the url works from the AMP console? Just paste it into a web browser.
Mines still running, no issues or changes that I recall, other than having to update the url from time to time (they expire) which is why I used $4 so I can just update the policy.

Got it!
I think the problem was that while testing this, I first set it up as you both suggested (leaving the script unedited and adding the URL in parameter #4 in Jamf); but then subsequently I edited the script and added the URL there but forgot to delete it from parameter #4 in Jamf. I understand it works both ways but you probably can't have the URL in the script and also in parameter #4 in Jamf.
Thanks so much for your time, @ubcoit and @cvangorp. I really appreciate it.
Hopefully I'm not reviving a dead thread for no reason but I am getting the same error. My deployment was always set with the script with the Connect Download URL in the $4 parameter in the policy. It seems in the last two weeks it stopped working and no one noticed as we haven't deployed any new device. I thought maybe just the URL was expired so I went to the AMP page and got a new URL which i replaced in $4 but still getting the Unable to retrieve URL error.
Any ideas?
Hopefully I'm not reviving a dead thread for no reason but I am getting the same error. My deployment was always set with the script with the Connect Download URL in the $4 parameter in the policy. It seems in the last two weeks it stopped working and no one noticed as we haven't deployed any new device. I thought maybe just the URL was expired so I went to the AMP page and got a new URL which i replaced in $4 but still getting the Unable to retrieve URL error.
Any ideas?
@sguntherDid you add the -i to grep?
dmgURL=$(curl --head "$redirectingURL" | grep "Location:" | awk '{print $2}')
to
dmgURL=$(curl --head "$redirectingURL" | grep -i "Location:" | awk '{print $2}')
@sguntherDid you add the -i to grep?
dmgURL=$(curl --head "$redirectingURL" | grep "Location:" | awk '{print $2}')
to
dmgURL=$(curl --head "$redirectingURL" | grep -i "Location:" | awk '{print $2}')
Thank you for the amazingly fast response! That did it! Any reason for the change?
@sgunther I believe the url changed and Location became location, lowercase. -i means any case. I swear it was already above but I think it might have been edited out, or was a totally different forum posting.
Glad it's all sorted.
Thank you @sgunther for bringing this up, and thank you @ubcoit for coming to the rescue once again. It stopped working for me as well a few weeks ago, but hadn't had the time to look into it. The "-i" was not in the script I used a few weeks ago. I just added it and everything is working again. Once more, thanks a bunch.
Thank you @sgunther for bringing this up, and thank you @ubcoit for coming to the rescue once again. It stopped working for me as well a few weeks ago, but hadn't had the time to look into it. The "-i" was not in the script I used a few weeks ago. I just added it and everything is working again. Once more, thanks a bunch.
Yes, thank you to @ubcoit for the quick fix. We noticed our once reliable Cisco Amp install script no longer working. Adding the -i to ignore the case of Location fixed it immediately.