Skip to content

Instantly share code, notes, and snippets.

@kitzy
kitzy / checkEnrollment.sh
Created May 10, 2015 02:29
This gist checks to see if JSS enrollment is complete, and attempts to force enrollment until sucessful.
#!/bin/bash
# Check to make sure the machine has enrolled before continuing
/bin/echo "Checking enrollment..."
until [ ! -f "/Library/Application Support/JAMF/FirstRun/Enroll/enroll.sh" ]
do
/bin/echo "Machine is not enrolled. Trying enrollment."
# Attempt enrollment
/Library/Application\ Support/JAMF/FirstRun/Enroll/enroll.sh
@kitzy
kitzy / deleteMacKeeper.sh
Created February 9, 2015 21:58
Delete MacKeeper and JustCloud
#!/bin/bash
# This program will uninstall MacKeeper and JustCloud
#################
### Variables ###
#################
# Items at the system level to be removed
systemItems=(
@kitzy
kitzy / rackspace_db_mod
Created January 31, 2013 20:11
This can be added to my jssdeploy script to accomodate for the JSS database connections dropping due to Rackspace's 120 second timeout on their Cloud Databases product.
# Modify database connection time from 300 to 100 to accommodate for Rackspace's Cloud Databases default timeout of 120 seconds
sed "s@<IdleConnectionTestPeriod>.*@<IdleConnectionTestPeriod>100</IdleConnectionTestPeriod>@" -i /var/lib/tomcat7/webapps/$instanceName/WEB-INF/xml/DataBase.xml