A first pass at an init script.
Almost working, but something is messing with the stack.