fix the service restart on agent, assuming it is also master