Skip to content

Commit

Permalink
fix: on windows restart service on config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fguimond committed Feb 16, 2024
1 parent 068230d commit 8c3f708
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions msi/wix/components.wxs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<?include variables.wxi ?>

<Fragment>
Expand Down Expand Up @@ -91,7 +91,10 @@
<!-- Add service for OTC -->
<ServiceInstall Id="Service" Name="!(loc.ServiceName)" DisplayName="!(loc.ServiceDisplayName)"
Description="!(loc.ServiceDescription)" Type="ownProcess" Vital="yes" Start="auto" Account="LocalSystem"
ErrorControl="normal" Arguments="[SERVICEARGUMENTS]" Interactive="no" />
ErrorControl="normal" Arguments="[SERVICEARGUMENTS]" Interactive="no">
<util:ServiceConfig FirstFailureActionType="restart" SecondFailureActionType="restart"
ThirdFailureActionType="restart" RestartServiceDelayInSeconds="0" ResetPeriodInDays="0" />
</ServiceInstall>

<!-- Start/Stop/Remove OTC service -->
<ServiceControl Id="StartServiceControl" Name="!(loc.ServiceName)" Start="install" Stop="both" Remove="uninstall" Wait="no" />
Expand Down
1 change: 1 addition & 0 deletions msi/wix/otelcol-sumo.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ItemGroup>
<PackageReference Include="WixToolset.Netfx.wixext" Version="4.0.1" />
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.1" />
<PackageReference Include="WixToolset.Util.wixext" Version="4.0.1" />
</ItemGroup>

<!-- <PropertyGroup Condition="'$(Platform)' == 'arm64'"> -->
Expand Down

0 comments on commit 8c3f708

Please sign in to comment.