Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download_jss_scripts.sh downloads are empty #12

Open
smashism opened this issue Jan 15, 2018 · 5 comments
Open

download_jss_scripts.sh downloads are empty #12

smashism opened this issue Jan 15, 2018 · 5 comments

Comments

@smashism
Copy link

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:

DEBUG: Script name is: Microsoft Lync Uninstall
DEBUG: Script extension is: Microsoft Lync Uninstall
Downloaded script "Microsoft Lync Uninstall.sh"...
-:10: parser error : Opening and ending tag mismatch: br line 8 and p
</p>
    ^
-:11: parser error : Opening and ending tag mismatch: p line 8 and body
</body>
       ^
-:12: parser error : Opening and ending tag mismatch: body line 5 and html
</html>
       ^
-:13: parser error : Premature end of data in tag html line 1

^

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.

@mm2270
Copy link
Owner

mm2270 commented Jan 15, 2018

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?

@mm2270
Copy link
Owner

mm2270 commented Jan 15, 2018

@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.

@smashism
Copy link
Author

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 🤔

@mm2270
Copy link
Owner

mm2270 commented Jan 15, 2018

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!

@dorminyk
Copy link

dorminyk commented Apr 6, 2021

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants