BOSH jobs can have drain scripts that BOSH runs when the job is restarted or stopped. These scripts allow the job to clean up and get into a state where it can be safely stopped. You can write BOSH ...