Give script a chance to exit cleanly before shutdown

Can be useful if running setup script under script logging utility.