24 lines
1.0 KiB
Batchfile
24 lines
1.0 KiB
Batchfile
:: ------------------------------------------------------------
|
|
:: Installationsroutine
|
|
:: ------------------------------------------------------------
|
|
|
|
:: --- Option: Download in ein temporäres Verzeichnis
|
|
:: --- Kann für z.B. für GLPI abgeschaltet werden
|
|
set SAVEPATH=%SYSTEMDRIVE%\TEMP\install
|
|
MKDIR %SAVEPATH% 2> nul & CD /D %SAVEPATH%
|
|
|
|
:: --- Download Basis-URL, Dateiname und TEMP-Verzeichnis
|
|
:: Major Version 7.4 + Minor Version 13 == 7.4.13
|
|
set VERS_MAJ=7.4
|
|
set VERS_MIN=%VERS_MAJ%.13
|
|
set BASEURL=https://cdn.zabbix.com/zabbix/binaries/stable/%VERS_MAJ%/%VERS_MIN%
|
|
set PROG=zabbix_agent2-%VERS_MIN%-windows-amd64-static.zip
|
|
|
|
:: --- Lade Datei herunter
|
|
echo Starte Download Version %VERS%.
|
|
curl -kLSsf %BASEURL%/%PROG% -o %SAVEPATH%\%PROG%
|
|
if %ERRORLEVEL% EQU 0 (echo Download OK! ) else ( echo Fehler %ERRORLEVEL% ist aufgetreten!)
|
|
|
|
powershell.exe -command "Expand-Archive -Force -Path %PROG% -DestinationPath C:\Zabbix "
|
|
if %ERRORLEVEL% EQU 0 (echo Entpacken OK! ) else ( echo Fehler %ERRORLEVEL% ist aufgetreten!)
|