An attempt to abstract this "init" script madness.