initscript: changed it to use better coding practices