Changes between Version 10 and Version 11 of RemoteUpdate


Ignore:
Timestamp:
05/29/12 00:44:04 (12 months ago)
Author:
pharoz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemoteUpdate

    v10 v11  
    3232net use I: /DELETE 
    3333}}} 
     34 
     35 
     36== Updating NSClient++ == 
     37This set of script will allow you to sync your files from a centralize share to your NSCliet++ install folder with logging info. After a successful copy, it will launch another batch script instance (reload.bat) to restart the NSClient++ service for the changes to take effect. [[BR]] 
     38 
     39'''Place both of these scripts in the script folder and create an entry in your NSC.ini for them. Make sure you modify the source variable to reflect your central share.'''  
     40 
     41'''update.bat''' 
     42{{{ 
     43@echo off 
     44@setlocal enableextensions 
     45@cd /d "%~dp0" 
     46 
     47REM Variables 
     48set source=\\your\share 
     49set rev=1.0 
     50 
     51REM Copying scripts 
     52echo %date%-%time% >> check_script_update.log 
     53copy "%source%\scripts\*.*" "%PROGRAMFILES%\NSClient++\scripts" /y >> check_script_update.log 
     54copy "%source%\*.*" "%PROGRAMFILES%\NSClient++\" /y >> check_script_update.log 
     55CLS 
     56@echo off 
     57 
     58IF ERRORLEVEL 1 GOTO err 
     59IF ERRORLEVEL 0 GOTO ok 
     60GOTO unknown 
     61  
     62:err 
     63echo CRITICAL: Script copy failed: rev %rev% 
     64exit /B 1 
     65  
     66:unknown 
     67echo UNKNOWN: Something went wrong: rev %rev% 
     68exit /B 3 
     69  
     70:ok 
     71echo OK: Script copy succeeded: rev %rev% 
     72start reload.bat 
     73exit /B 0 
     74}}} 
     75 
     76'''reload.bat''' 
     77{{{ 
     78@echo off 
     79@setlocal enableextensions 
     80@cd /d "%~dp0" 
     81 
     82"%PROGRAMFILES%\NSClient++\nsclient++.exe" -stop 
     83"%PROGRAMFILES%\NSClient++\nsclient++.exe" -start 
     84EXIT 
     85}}}