Don't fail on netsh commands

tags/wpkg-zabbix_agent-3.4.3-0.beta1
Daniel Berteaud 8 years ago
parent a8cab16f9e
commit ed14cfcc64
  1. 13
      packages/zabbix_agent.xml

@ -12,7 +12,9 @@
<check type="uninstall" condition="versiongreaterorequal" path="Zabbix Agent" value="%PKG_VERSION%"/>
<install cmd='msiexec /qn /i "%MSI%" SERVER=%ZBX_SERVER_IP% RMTCMD=0' />
<install cmd='netsh advfirewall firewall add rule name="Zabbix Agent" dir=in action=allow protocol=TCP localport=10050 enable=yes remoteip=%ZBX_SERVER_IP%' />
<install cmd='netsh advfirewall firewall add rule name="Zabbix Agent" dir=in action=allow protocol=TCP localport=10050 enable=yes remoteip=%ZBX_SERVER_IP%'>
<exit code="any" />
</install>
<install cmd='%COMSPEC% /C sc start "Zabbix Agent"'>
<exit code="any" />
</install>
@ -24,7 +26,9 @@
<exit code="1" />
<exit code="0" />
</upgrade>
<upgrade cmd='netsh advfirewall firewall del rule name="Zabbix Agent"' />
<upgrade cmd='netsh advfirewall firewall del rule name="Zabbix Agent"'>
<exit code="any" />
</upgrade>
<upgrade include="install" />
<!-- Sometimes on upgrades, the service is not correctly created -->
<upgrade cmd='"%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.exe" -c "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.conf" --install'>
@ -42,7 +46,8 @@
<exit code="any" />
</remove>
<remove cmd='msiexec /qn /norestart /x "%MSI%"' />
<remove cmd='netsh advfirewall firewall del rule name="Zabbix Agent"' />
<remove cmd='netsh advfirewall firewall del rule name="Zabbix Agent"'>
<exit code="any" />
</remove>
</package>
</packages>

Loading…
Cancel
Save