Rewrite the init script with shell script.