Doing it wrong

Hi again all -

I’ve made a great deal of progress with my own cookbook now but have a
question about service management.

If the thing I’m installing eventually installs a service (we have or own
service install script), is there a good way to test if the service is
already installed?

I tried to just stop, deploy, start things and it only will run the first
instance of the service call.

Any suggestions?

This feels wrong…

Apparently, there is:

windows_batch "install_service" do
    cwd <somepath>
    code <<-EOH
        call <wrapperfile> <servicename>
    not_if "sc query <servicename>"

now is there a good way to sleep during a service start command?