Conditionnaly uninstall the service

tags/wpkg-zabbix_agent-3.4.3-0.beta1 3.0.1_el5
Daniel Berteaud 9 years ago
parent edcf0afaf5
commit a3d145dba3
  1. 5
      packages/zabbix_agent.xml

@ -2,7 +2,7 @@
<packages>
<package id="zabbix_agent"
name="Agent de supervision Zabbix"
revision="20"
revision="22"
priority="10">
<variable name="PKG_VERSION" value="3.0.1" />
@ -11,6 +11,9 @@
<check type="uninstall" condition="versiongreaterorequal" path="Zabbix Agent" value="%PKG_VERSION%"/>
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.exe" "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.exe" -c "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.conf" --uninstall'>
<exit code="any" />
</install>
<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='%COMSPEC% /C sc start "Zabbix Agent"'>

Loading…
Cancel
Save