![]() ![]() # have to wait for a policy to finish running. # This should help ensure that both an inventory update and check-in can run and not # Verifies that the /var/log/jamf.log hasn't been written to for at least five minutes. usr/bin/logger "Machine cannot connect to $jamfpro_server_address. usr/bin/logger "Machine can connect to $jamfpro_server_address. bin/cat > " $temp_directory/runjamfproinventoryupdate.sh " /dev/null echo $?) # to write the shell script contained below to a new file. # Create the runjamfproinventoryupdate script by using cat input redirection # The LaunchDaemon will run at load and every minute thereafter. # to write the XML contained below to a new file. # Create the runjamfproinventoryupdate LaunchDaemon by using cat input redirection "/var/root/runjamfproinventoryupdate.sh " # Delete LaunchDaemon and script files files if they exist # unload the LaunchDaemon and remove the LaunchDaemon and script files # If any previous instances of the runjamfproinventoryupdate LaunchDaemon and script exist, # server is using port 8443, the variable should look like this: # For on-premise Jamf Pro installations, this port is most commonly port 8443. # If your Jamf Pro server is not using port 443, please change this port to the correct number. # This port is correct for all Jamf Cloud-hosted installations of Jamf Pro. # Note: The "runjamfproinventoryupdate.sh" script which is part of this script has the following variable set: # Runs jamf recon to send an updated inventory to the Jamf Pro server # Runs jamf manage to enforce the management framework using the latest available data from the Jamf Pro server # the script runs the following functions: # Once it has been verified that the /var/log/jamf.log file has not been modified for at least the last five minutes, # Checks to see if the /var/log/jamf.log file has been modified in the previous five minutes. # Once communication is verified, it takes the following actions: # The LaunchDaemon and accompanying script created by running this script verifies that the Mac can communicate with the Jamf Pro server. # Script for use with Jamf Pro when you want to trigger an update of the management framework, followed by an inventory update. This script is available below and also from GitHub at the following location: ![]() Both the script and LaunchDaemon are in the computer’s memory, so it’s possible to delete the files before the script unloads the LaunchDaemon from LaunchD. If the LaunchDaemon is unloaded before the script deletes the LaunchDaemon’s and script’s file, LaunchD will stop the script’s run at the point where the LaunchDaemon unload command occurred. Note: The order for deletion and unloading is important.
0 Comments
Leave a Reply. |