From 0ecaefeb10d48bcf23c06840711b328ce9577c8f Mon Sep 17 00:00:00 2001 From: elpatron Date: Mon, 20 Jan 2025 10:49:29 +0100 Subject: [PATCH] Create directory before nssm download --- install-beszel-service.cmd | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install-beszel-service.cmd b/install-beszel-service.cmd index f5133f5..ee5ff37 100644 --- a/install-beszel-service.cmd +++ b/install-beszel-service.cmd @@ -21,6 +21,9 @@ set BESZELKEYPREFIX=%1 set BESZELKEY=%2 call env.cmd +echo Creating directory %DESTINATIONDIR% +md "%DESTINATIONDIR%" >nul 2>&1 + where nssm.exe >nul 2>&1 if %errorlevel% NEQ 0 goto installnssm goto proceed @@ -38,9 +41,6 @@ del "%TEMP%\nssm-2.24.zip" >nul 2>&1 rd /s/q .\nssm-2.24 >nul 2>&1 :proceed -echo Creating directory %DESTINATIONDIR% -md "%DESTINATIONDIR%" >nul 2>&1 - echo Copying agent.exe to %DESTINATIONDIR% copy .\agent.exe "%DESTINATIONDIR%\" >nul 2>&1 @@ -62,10 +62,9 @@ if %errorlevel% NEQ 0 ( ) echo Starting %SERVICENAME% -%NSSMEXE% start %SERVICENAME% >nul 2>&1 +%NSSMEXE% start %SERVICENAME% if %errorlevel% NEQ 0 ( - echo Failed to start service. - goto end + echo Check output above. ) echo Dumping service state