Clean up init.d script, fix dependencies and indentation.