#!/bin/bash # Bash script that will request multiple pages from Jamf showing the HTTP 500 error that sometimes # occurs due to 'Ghost' devices. # # This script should be run, and the script and output shared with Jamf support to create a ticket # with Jamf to get the issue resolved. # # Before running, set the following parameters # # export CLIENT_ID=your_client_id_here # export CLIENT_SECRET=your_client_secret_here # export HOST=yourorg.jamfcloud.com # export NUM_PAGES=20 # # Then save the script locally and do: # chmod +x ./showHTTP500.sh && ./showHTTP500.sh # Ensure HOST, CLIENT_ID, and CLIENT_SECRET are set if [ -z "$HOST" ] || [ -z "$CLIENT_ID" ] || [ -z "$CLIENT_SECRET" ]; then echo "HOST, CLIENT_ID, and CLIENT_SECRET must all be set. Please set them before running this script." exit 1 fi # Use NUM_PAGES if exported, else default to 20 NUM_PAGES=${NUM_PAGES:-20} cat <