Open smashism opened 6 years ago
Hey Emily, thanks for the heads up. Been a while since I worked these scripts against a current Jamf Pro setup. I will take a look at it and see what needs to be updated. Just so I know I'm working against the correct setup, what version of Jamf Pro are you running it against that's throwing those errors?
@smashism Ok, never mind. I was able to find the issue. Oddly enough, the problem was mostly from the curl header -H "Accept: application/xml"
being after the -u
flag for the username/password credentials. I don't know why, but placing it first addressed the main issue. I also cleaned up the script a little. Change on line 156 from using xmllint
and passing the results through a bunch of crazy sed commands to get the script contents. It now uses xpath
and goes right to script_contents
to get just the script by itself. Much cleaner.
The script is now updated with the above changes. Please give it a try and let me know when you have time if it's working for you now.
Worked swimmingly!
Is it possible that similar tweaks might be required by the EA download as well? I have a few EAs that skip some lines on the download/save for some reason, not sure why 🤔
Yes, I might need to go look at that script as well as they use similar code to pull down the script content. Glad this one is working now though!
I've copied this script from the main page and I'm running into the same issue that the OP ran into... I haven't made any changes to my script...
Heya, when running the download_jss_scripts.sh script all the files being downloaded are totally empty. I also get this error for each script:
Since I get that for each script download attempted it does not seem to be an issue with the scripts themselves since they can't all be completely identical.