如何檢查是否安裝了服務並啓動服務(如果安裝了,否則安裝並啓動服務服務於廚師的Windows如何檢查是否安裝了服務並啓動服務(如果安裝了其他服務,如果安裝並啓動Windows的廚師的服務)
if service "VigilEntAgent"
supports :status => false then
package 'VigilEntAgent' do
source 'xxx'
action :install
end
else
service "VigilEntAgent" do
action :start
end
不幸的是,這不是Windows服務的往往是如何工作的,特別是'status_command'。 Windows上的服務比Unix平臺上的服務要複雜得多。 – coderanger
我很確定我過去做過(對於基於nssm的服務),但也許這仍然是由一箇舊客戶端處理,幷包含一個醜陋的黑客。 – Tensibai