Help with init script

I think I need this but the wiki is not really good with step by step.