"Simplify" was the wrong word. The first script led to a phantom instance, which had to be manually killed with each restart.