tuto:gestion_de_parc:wpkg:start

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
tuto:gestion_de_parc:wpkg:start [30/10/2015 12:17]
dani [Logiciels]
tuto:gestion_de_parc:wpkg:start [30/10/2015 16:47] (Version actuelle)
dani
Ligne 50: Ligne 50:
  
 <code batch> <code batch>
-net use W: https://sme.domain.tld/wpkg/ /USER:deploiement p@ssw0rd +@echo off 
-robocopy /MIR W:\ %SystemDrive%\wpkg\repository\+ 
 +SET USER=deploiement 
 +SET PASS=p@ssw0rd 
 +SET REPO=https://sme.domain.tld/wpkg/ 
 +REM SET REPO=\\192.168.7.1\wpkg 
 + 
 +echo %DATE% %TIME% > %SystemDrive\wpkg\status\sync_in_progress.txt 
 + 
 +net use W: %REPO% /USER:%USER% %PASS% 
 + 
 +robocopy /MIR /R:10 /LOG:%SystemDrive%\wpkg\status\sync_log.txt W:\ %SystemDrive%\wpkg\repository\ 
 + 
 +REM Fatal Error 
 +if %ERRORLEVEL% EQU 16 goto cleanup 
 +REM Copy done, with errors, mismatches and new files not copied 
 +if %ERRORLEVEL% EQU 15 goto cleanup 
 +REM Copy failed, with mismatches and new files not copied 
 +if %ERRORLEVEL% EQU 14 goto cleanup 
 +REM Copy done, with errors and mismatches 
 +if %ERRORLEVEL% EQU 13 goto cleanup 
 +REM Copy failed with mismatches 
 +if %ERRORLEVEL% EQU 12 goto cleanup 
 +REM Copy done with errors and new files not copied 
 +if %ERRORLEVEL% EQU 11 goto cleanup 
 +if %ERRORLEVEL% EQU 10 echo FAIL + XTRA & goto end 
 +REM Copy done with errors 
 +if %ERRORLEVEL% EQU 9 goto cleanup 
 +REM Copy failed 
 +if %ERRORLEVEL% EQU 8 goto cleanup 
 +REM Copy done, with mismatches and new files not copied 
 +if %ERRORLEVEL% EQU 7 goto cleanup 
 +REM Mismatches and new files not copied 
 +if %ERRORLEVEL% EQU 6 goto cleanup 
 +REM Copy done with mismatches 
 +if %ERRORLEVEL% EQU 5 goto cleanup 
 +REM Mismatches 
 +if %ERRORLEVEL% EQU 4 goto cleanup 
 +REM Copy done, new files not copied 
 +if %ERRORLEVEL% EQU 3 goto cleanup 
 +REM New files not copied 
 +if %ERRORLEVEL% EQU 2 goto cleanup 
 +REM Copy done, we have new files, updates is required 
 +if %ERRORLEVEL% EQU 1 goto exec 
 +REM No error, nothing copied, no updates 
 +if %ERRORLEVEL% EQU 0 goto cleanup 
 + 
 +:exec 
 +echo %DATE% %TIME% > %SystemDrive%\wpkg\status\updates_pending.txt 
 +goto :EOF 
 + 
 +:cleanup 
 +del %SystemDrive\wpkg\status\sync_in_progress.txt 
 +</code> 
 + 
 +  * Pour programmer la synchro toutes les 3 heures 
 + 
 +<code batch> 
 +schtasks.exe /Create /tn "sync_wpkg" /sc hourly /mo 3 /ru "SYSTEM" /tr "%SystemDrive%\bin\sync_wpkg.bat"
 </code> </code>
  • tuto/gestion_de_parc/wpkg/start.1446203823.txt.gz
  • Dernière modification: 30/10/2015 12:17
  • de dani