Rewrite of the init.d script