added enhancements to init.d script