Use advfirewall syntaxe to open the port

tags/wpkg-zabbix_agent-3.4.3-0.beta1
Daniel Berteaud 9 years ago
parent ce8ae389d4
commit 2d8dc16254
  1. 6
      packages/zabbix_agent.xml

@ -2,7 +2,7 @@
<packages> <packages>
<package id="zabbix_agent" <package id="zabbix_agent"
name="Agent de supervision Zabbix" name="Agent de supervision Zabbix"
revision="18" revision="19"
priority="10"> priority="10">
<variable name="PKG_VERSION" value="3.0.1" /> <variable name="PKG_VERSION" value="3.0.1" />
@ -12,7 +12,7 @@
<check type="uninstall" condition="versiongreaterorequal" path="Zabbix Agent" value="%PKG_VERSION%"/> <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='msiexec /qn /i "%MSI%" SERVER=%ZBX_SERVER_IP% RMTCMD=0' />
<install cmd='netsh firewall add portopening TCP 10050 "Zabbix Agent" enable custom "%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%' />
<upgrade cmd='"%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.exe" -c "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.conf" --stop'> <upgrade cmd='"%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.exe" -c "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.conf" --stop'>
<exit code="1" /> <exit code="1" />
@ -43,7 +43,7 @@
<exit code="0" /> <exit code="0" />
</remove> </remove>
<remove cmd='%COMSPEC% /C msiexec /qn /norestart /x "%MSI%"' /> <remove cmd='%COMSPEC% /C msiexec /qn /norestart /x "%MSI%"' />
<remove cmd='netsh firewall delete portopening TCP 10050' /> <remove cmd='netsh advfirewall firewall del rule name="Zabbix Agent"' />
</package> </package>
</packages> </packages>

Loading…
Cancel
Save