Generic solution for pre/post start/stop scripts

And room for generic "extra" stuff

Clean version of #6