- Scripts: start-webdav.cmd, stop-webdav.cmd (echo messages, REM comments) - Server: server.js (console.log, HTTP error messages) - Token tools: token-test.js, token-refresh.js - Other: auth-poc.js, debug-name-decrypt.js, internxt-client.js, upload.js - Docs: README, .env.example, docs/*.md Made-with: Cursor
19 lines
639 B
Batchfile
19 lines
639 B
Batchfile
@echo off
|
|
REM Duplicati Post-Backup: Stop WebDAV server
|
|
REM In Duplicati: Settings -> Advanced -> Scripts -> Run after backup
|
|
REM Path: C:\path\to\internxt-webdav\scripts\stop-webdav.cmd
|
|
REM Optional: Port as argument (e.g. stop-webdav.cmd 8080)
|
|
|
|
if "%1"=="" (set PORT=3005) else (set PORT=%1)
|
|
|
|
REM Find and terminate process on port
|
|
REM Filter: Port + "0.0.0.0:0" = Listening (language-independent)
|
|
for /f "tokens=5" %%a in ('netstat -ano 2^>nul ^| findstr /C:":%PORT% " ^| findstr /C:"0.0.0.0:0"') do (
|
|
taskkill /PID %%a /F > nul 2>&1
|
|
echo WebDAV server stopped - PID %%a
|
|
exit /b 0
|
|
)
|
|
|
|
echo WebDAV server was not running.
|
|
exit /b 0
|