You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xit-ntri/REF/deploy/ntri/bin/service-regist.bat

34 lines
969 B
Batchfile

@echo off
setlocal
call %~dp0/setenv.bat
echo Service Add...
%~dp0/nssm install %NTRI_SERVICE_NAME% "%NTRI_APP_BIN_DIR%/startup.bat"
%~dp0/nssm set %NTRI_SERVICE_NAME% AppDirectory %NTRI_APP_DIR%
%~dp0/nssm set %NTRI_SERVICE_NAME% Description %NTRI_SERVICE_DESCRIPTION%
%~dp0/nssm set %NTRI_SERVICE_NAME% AppStdin %NTRI_LOG_PATH%/stdin.log
%~dp0/nssm set %NTRI_SERVICE_NAME% AppStdout %NTRI_LOG_PATH%/stdout.log
%~dp0/nssm set %NTRI_SERVICE_NAME% AppStderr %NTRI_LOG_PATH%/stderr.log
%~dp0/nssm set %NTRI_SERVICE_NAME% AppStdoutCreationDisposition 4
%~dp0/nssm set %NTRI_SERVICE_NAME% AppStderrCreationDisposition 4
%~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateFiles 1
%~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateOnline 1
%~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateSeconds 2592000
%~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateBytes 104857600
%~dp0/nssm set %NTRI_SERVICE_NAME% Start SERVICE_AUTO_START
rem %~dp0/nssm start %NTRI_SERVICE_NAME%
echo.
pause