Skip to content

Instantly share code, notes, and snippets.

@haircut
haircut / README.md
Last active September 30, 2020 21:17
NoMAD control scripts

NoMAD control scripts

  • nomad-add-launchagent.py: creates the NoMAD LaunchAgent
  • nomad-load-launchagent.py: loads an existing NoMAD LaunchAgent
  • nomad-pre-update.py: unloads NoMAD LaunchAgent and quits NoMAD prior to installing an updated version

These scripts are designed to be used in Jamf Pro policies. I've separated the functionality for different use cases and flexibility. The ...add... and ...load... file naming convention ensures the scripts will run in the correct order since Jamf Pro runs scripts alphabetically.

@rtrouton
rtrouton / gist:8456551
Last active January 3, 2016 11:29
This script will add two servers to the Oracle Java Exception Site List. If the servers are already in the whitelist, it will note that in the log, then exit.Since these settings are stored on a per-user basis, I recommend running this script with a launchagent. That will allow the script to run with the logged-in user’s privileges and permissions.
#!/bin/sh
# This script will add two servers to the Oracle Java Exception Site List.
# If the servers are already in the whitelist, it will note that in the log, then exit.
# More servers can be added as needed. The existing server entries can also be set to be
# empty (i.e. SERVER2='') as the script will do a check to see if either SERVER value
# is set to be null.
# Server1's address
SERVER1='http://server.name.here'