The best way to go, long term, is to rewrite the whole thing as something new and shiny, with no (ba)sh stuff, only pike. Then we can write a sh-compiler that compiles our native config language to sh for source dists etc.
The first decision would be to decide if we want to invent a new config-language or if we want pure pike. A new config language would probably be easier to compile into sh-scripts while pike would give us *MUCH* more powerful configuration scripts.