diff options
author | aliasgar16 <aliasgar.batterywala@msystechnologies.com> | 2016-11-14 21:09:32 +0530 |
---|---|---|
committer | aliasgar16 <aliasgar.batterywala@msystechnologies.com> | 2016-12-09 19:40:29 +0530 |
commit | ce1a4f7a8a12d56a60321297b66b24f6404dcc64 (patch) | |
tree | 0f7fb7bcfdf287f6d19eb7d1eb3b2b6fb4a436c5 /omnibus/resources | |
parent | ef18311bdfe53eb87460c3638f7571131b10d96d (diff) | |
download | chef-ce1a4f7a8a12d56a60321297b66b24f6404dcc64.tar.gz |
Added support in WIX to install chef-client as a scheduled task.
Signed-off-by: aliasgar16 <aliasgar.batterywala@msystechnologies.com>
Diffstat (limited to 'omnibus/resources')
-rw-r--r-- | omnibus/resources/chef/msi/localization-en-us.wxl.erb | 4 | ||||
-rw-r--r-- | omnibus/resources/chef/msi/source.wxs.erb | 24 |
2 files changed, 26 insertions, 2 deletions
diff --git a/omnibus/resources/chef/msi/localization-en-us.wxl.erb b/omnibus/resources/chef/msi/localization-en-us.wxl.erb index 62c27b99f6..00e9e254b2 100644 --- a/omnibus/resources/chef/msi/localization-en-us.wxl.erb +++ b/omnibus/resources/chef/msi/localization-en-us.wxl.erb @@ -16,11 +16,15 @@ <String Id="VerifyReadyDlgInstallTitle">{\WixUI_Font_Title_White}Ready to install [ProductName]</String> + <!-- Schedule Task --> + <String Id="SchTaskDisplayName"><%= friendly_name %> Schedule Task</String> + <String Id="SchTaskDescription">Schedule <%= friendly_name %> to run at a pre-defined time intervals.</String> <!-- Service --> <!-- Keep these in sync with the name and description in chef-service-manager --> <String Id="ServiceDisplayName"><%= friendly_name %> Service</String> <String Id="ServiceDescription">Runs <%= friendly_name %> on regular, configurable intervals.</String> <String Id="FeatureMainName"><%= friendly_name %></String> + <String Id="FeatureSchTaskName"><%= friendly_name %> Schedule Task</String> <String Id="FeatureServiceName"><%= friendly_name %> Service</String> <String Id="FeaturePSModuleName"><%= friendly_name %> PowerShell wrappers</String> diff --git a/omnibus/resources/chef/msi/source.wxs.erb b/omnibus/resources/chef/msi/source.wxs.erb index bdde02687e..1db366e352 100644 --- a/omnibus/resources/chef/msi/source.wxs.erb +++ b/omnibus/resources/chef/msi/source.wxs.erb @@ -67,9 +67,19 @@ Impersonate="no" Return="ignore" /> + <CustomAction Id="CreateChefClientScheduledTask" + Directory="TARGETDIR" + ExeCommand=""[SystemFolder]SCHTASKS.EXE" /CREATE /TN "ChefClientSchTask" /SC "MINUTE" /MO "20" /F /TR ""cmd /c "[RubyExecutable] [ChefClientPath]\chef-client -L [ChefClientLog]\chef-client.log -c [CONFIGLOCATION]\client.rb""" /RU "temp_user" /RP "temp_password@123" /RL "HIGHEST" /ST "(Time.now + 60 * 30).strftime('%H:%M')"" + Execute="deferred" + Impersonate="no" + Return="check" /> + <InstallExecuteSequence> <Custom Action="FastUnzip" After="InstallFiles">NOT Installed</Custom> <Custom Action="Cleanup" After="RemoveFiles">REMOVE~="ALL"</Custom> + <Custom Action="CreateChefClientScheduledTask" After="InstallFiles"> + <![CDATA[&ChefSchTaskFeature=3]]> + </Custom> </InstallExecuteSequence> <UI> @@ -151,8 +161,18 @@ <ComponentRef Id="ChefPSModulePath" /> </Feature> - <Feature Id="ChefServiceFeature" Title="!(loc.FeatureServiceName)" Level="1000" AllowAdvertise="no"> - <ComponentRef Id="ChefClientService" /> + <Feature Id="ChefServiceOptions"> + <Feature Id="ChefSchTaskFeature" Title="!(loc.FeatureSchTaskName)" Level="1000" AllowAdvertise="no"> + <!--CustomAction will get executed and scheduled task for chef-client will get created--> + </Feature> + + <Feature Id="ChefServiceFeature" Title="!(loc.FeatureServiceName)" Level="1000" AllowAdvertise="no"> + <ComponentRef Id="ChefClientService" /> + </Feature> + + <Feature Id="None" Title="None" Level="1000" AllowAdvertise="no"> + <!--Do Nothing--> + </Feature> </Feature> <!-- |