sensu-plugins / sensu-plugins-windows

Sensu Windows Plugins

Home Page:http://sensu-plugins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

check-windows-service.rb problem when spaces in the service name

calvinx408 opened this issue · comments

Needs quotes around the config service name when service name has spaces.

I fixed this problem by adding the following:

cmd= 'tasklist /svc|findstr /r /c:' + '"'+ config[:service] +'"'
#cmd= 'tasklist /svc|findstr /i ' + '"'+ config[:service] +'\"'
temp = system(cmd)

could you put together a pr?