fix typos in cfg and rewrite init.d