Improve the init.d file (issues #188 and #251)