incorporate further improvements to init script from https://github.com/Supervisor/initscripts