Configurations are done with the service stopped. Otherwise, on line 39 you start a service that's already running.