in reply to HTTP::Proxy as a service?
The start/stop/restart can be handled manually with the Services Administrative Tool, or you can write a simple .cmd script and issue start/stop commands...################################################################# # Function: DaemonLoop # # Description: Run our various tasks # ################################################################# sub DaemonLoop { while(1) { # <Your code here...> sleep $ENV{SLEEP_TIME}; } return 0; }
echo Stopping ArchMaint >> %LOG_FILE% NET STOP ArchMaint >> %LOG_FILE% 2>&1 set SAVE_ERRORLEVEL=%ERRORLEVEL% echo Return code = %SAVE_ERRORLEVEL% >> %LOG_FILE% if not "%SAVE_ERRORLEVEL%"=="0" call :SEND_EMAIL ArchMaint not run +ning if exist %NTRESKIT%\sleep.exe %NTRESKIT%\sleep 10 echo Starting ArchMaint >> %LOG_FILE% net START ArchMaint >> %LOG_FILE% 2>&1 set SAVE_ERRORLEVEL=%ERRORLEVEL% echo Return code = %SAVE_ERRORLEVEL% >> %LOG_FILE% if not "%SAVE_ERRORLEVEL%"=="0" call :SEND_EMAIL ArchMaint start f +ailed echo Finished restarting ArchMaint >> %LOG_FILE%
|
|---|