Minecraft wiki entry for Create_a_Mac_OS_X_startup_daemon, associated text: Tip #3: this code might receive a shutdown request, so there really should be a trap command or else it could get interrupted while it's backing up.