I don't really understand what is going on here. It looks like the logic is 'if the server is booting restart the service' however I don't really see why this should be necessary, because if the server is booting then there should be no service there yet to restart?