TracNav menu
Here is %SystemDrive?%\NSClient++\scripts content for remote update:
updatecmd.bat
@ECHO OFF ECHO ======================================================== >> %SystemDrive%\NSClient++\install.log date /t >> %SystemDrive%\NSClient++\install.log time /t >> %SystemDrive%\NSClient++\install.log ECHO Downloading new flexsense agent... >> %SystemDrive%\NSClient++\install.log %SystemDrive% cd \NSClient++ ftp -i -s:%SystemDrive%\NSClient++\install\updateagent.txt <ftp_ip_address> >> %SystemDrive%\NSClient++\install.log ECHO Done! >> %SystemDrive%\NSClient++\install.log ECHO Installing/Upgrading new agent... >> %SystemDrive%\NSClient++\install.log msiexec /i %SystemDrive%\NSClient++\install\flexsense.msi /quiet ECHO Done! >> %SystemDrive%\NSClient++\install.log
updateagent.txt:
<user> <password> binary get NSClient++.msi bye
update.bat (command to be used as NRPE external script):
@ECHO OFF if (%1) == () goto exit_usage mkdir %SystemDrive%\NSClient++\install > NUL copy %SystemDrive%\NSClient++\scripts\updatecmd.bat %SystemDrive%\NSClient++\install\updatecmd.bat copy %SystemDrive%\NSClient++\scripts\updateagent.txt %SystemDrive%\NSClient++\install\updateagent.txt at %1 "%SystemDrive%\NSClient++\install\updatecmd.bat" goto exit_0 :exit_usage ECHO ERROR: You didn't provide time. ECHO Ex: ./check_nrpe ... -c UpdateAgent -a 03:30PM :exit_0
NSC.ini file (NRPE custom command)
command[UpdateAgent]=scripts\update.bat $ARG1$
If you have any doubts about this solution please don't hesitate and contact me:
contact at djmario dot ro
Thank you. marius chisa
