Add some echoes
This commit is contained in:
@@ -13,22 +13,34 @@ if %errorlevel%==1 goto install
|
||||
goto proceed
|
||||
|
||||
:install
|
||||
echo Installing NSSM with winget
|
||||
winget install nssm
|
||||
rem Refresh the environment to start nssm from %PATH%
|
||||
rem Call RefreshEnv.cmd from Chocolatey:
|
||||
call .\RefreshEnv.cmd
|
||||
|
||||
:proceed
|
||||
md "%DESTINATIONDIR%"
|
||||
echo Creating deirectory %DESTINATIONDIR%
|
||||
md "%DESTINATIONDIR%" >nul 2>&1
|
||||
|
||||
echo Copying agent.exe
|
||||
copy .\agent.exe "%DESTINATIONDIR%\" >nul 2>&1
|
||||
|
||||
echo Adding firewall rule
|
||||
netsh advfirewall firewall add rule name="%SERVICENAME%" dir=in action=allow program="%AGENTEXE%" enable=yes >nul 2>&1
|
||||
|
||||
echo Installing service
|
||||
nssm install %SERVICENAME% "%AGENTEXE%" >nul 2>&1
|
||||
nssm set %SERVICENAME% AppEnvironmentExtra "KEY=%BESZELKEYPREFIX% %BESZELKEY%" >nul 2>&1
|
||||
|
||||
echo Setting environment für service
|
||||
nssm start %SERVICENAME% >nul 2>&1
|
||||
|
||||
echo Service installed, status:
|
||||
nssm dump %SERVICENAME%
|
||||
goto end
|
||||
|
||||
:help
|
||||
echo You have to provide a Beszel ssh key, e.g. 'install-beszel-service.cmd ssh-ed25519 AAAAC3L3lIpn94iu2TIpdmneXsEC1TDvrg4HCNoM1aiC683WMZfGOVoatrJSkysaQB9K
|
||||
|
||||
echo The key must not be enclosed in "" or '', just copy and paste it as it is.
|
||||
:end
|
Reference in New Issue
Block a user