From 18defb93fd7f5cce4edad50ca5c62236ebda9100 Mon Sep 17 00:00:00 2001 From: Flamur Veliqi Date: Thu, 22 Jan 2026 19:54:52 +0100 Subject: [PATCH] CPN commit --- docker-restart.bat | 43 +++++++++++++++++++++++++++ faceit-logout.bat | 11 +++++++ lancache-delete-gamecache.bat | 55 +++++++++++++++++++++++++++++++++++ steam-logout.bat | 38 ++++++++++++++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 docker-restart.bat create mode 100644 faceit-logout.bat create mode 100644 lancache-delete-gamecache.bat create mode 100644 steam-logout.bat diff --git a/docker-restart.bat b/docker-restart.bat new file mode 100644 index 0000000..d988b42 --- /dev/null +++ b/docker-restart.bat @@ -0,0 +1,43 @@ +@echo off +REM === Interactive Server Configuration === +echo ======================================== +echo Lancache Container Restart +echo ======================================== +echo. + +REM Prompt for username +set /p USER="Enter username" + +REM Prompt for server IP +set /p HOST="Enter server IP" + +REM Password hint (SSH will prompt for password) +echo. +echo Note: You will be prompted for the SSH password shortly. +echo. +pause + +REM === Restart Lancache Containers === +echo. +echo Connecting to server %HOST% and restarting Lancache... +ssh %USER%@%HOST% "cd lancache && docker-compose down && docker-compose up -d" + +if errorlevel 1 ( + echo. + echo ERROR: Connection or execution failed! + pause + exit /b 1 +) + +REM === Display status after restart === +echo. +echo ======================================== +echo Container Status +echo ======================================== +ssh %USER%@%HOST% "cd lancache && docker-compose ps" + +echo. +echo ======================================== +echo Process completed! +echo ======================================== +pause \ No newline at end of file diff --git a/faceit-logout.bat b/faceit-logout.bat new file mode 100644 index 0000000..9897f23 --- /dev/null +++ b/faceit-logout.bat @@ -0,0 +1,11 @@ +@echo off +echo FACEIT Anti-Cheat logout in progress… + +:: Kill processes first +taskkill /f /im "FaceitClient.exe" >nul 2>&1 +taskkill /f /im "FaceitClientService.exe" >nul 2>&1 + +:: Delete local session/cache +rmdir /s /q "%localappdata%\FACEIT" + +echo Logout successful. You’ll be required to log in again on reopening FACEIT. \ No newline at end of file diff --git a/lancache-delete-gamecache.bat b/lancache-delete-gamecache.bat new file mode 100644 index 0000000..d6b809c --- /dev/null +++ b/lancache-delete-gamecache.bat @@ -0,0 +1,55 @@ +@echo off +REM === Interactive Server Configuration === +echo ======================================== +echo Lancache Cache Cleanup and Restart +echo ======================================== +echo. + +REM Prompt for username +set /p USER="Enter username" + +REM Prompt for server IP +set /p HOST="Enter server IP" + +REM Password hint (SSH will prompt for password) +echo. +echo Note: You will be prompted for the SSH password shortly. +echo. +pause + +REM === Warning about cache deletion === +echo. +echo WARNING: This will delete all cached game files! +echo. +set /p CONFIRM="Are you sure you want to continue? (Y/N): " +if /i not "%CONFIRM%"=="Y" ( + echo. + echo Operation cancelled. + pause + exit /b 0 +) + +REM === Deleting Gamecache Files === +echo. +echo Deleting game cache files and restarting containers... +ssh %USER%@%HOST% "rm -rf lancache/lancache/cache/cache* && cd lancache && docker-compose down && docker-compose up -d" + +if errorlevel 1 ( + echo. + echo ERROR: Connection or execution failed! + pause + exit /b 1 +) + +REM === Display status after restart === +echo. +echo ======================================== +echo Container Status +echo ======================================== +ssh %USER%@%HOST% "cd lancache && docker-compose ps" + +echo. +echo ======================================== +echo Cache cleared and process completed! +echo ======================================== +pause \ No newline at end of file diff --git a/steam-logout.bat b/steam-logout.bat new file mode 100644 index 0000000..5d821ad --- /dev/null +++ b/steam-logout.bat @@ -0,0 +1,38 @@ +@echo off +echo Logging out from Steam... + +:: Kill Steam if running +taskkill /f /im steam.exe >nul 2>&1 + +:: Get Steam installation path from registry +for /f "tokens=2*" %%a in ( + 'reg query "HKCU\Software\Valve\Steam" /v SteamPath 2^>nul' +) do set SteamPath=%%b + +:: If not found, try 64-bit registry key +if not defined SteamPath ( + for /f "tokens=2*" %%a in ( + 'reg query "HKLM\SOFTWARE\Wow6432Node\Valve\Steam" /v InstallPath 2^>nul' + ) do set SteamPath=%%b +) + +:: If still not found, try 32-bit registry key +if not defined SteamPath ( + for /f "tokens=2*" %%a in ( + 'reg query "HKLM\SOFTWARE\Valve\Steam" /v InstallPath 2^>nul' + ) do set SteamPath=%%b +) + +:: Check if Steam was found +if not defined SteamPath ( + echo Steam installation not found! + pause + exit /b +) + +:: Delete login cache files (forces logout) +del "%SteamPath%\config\loginusers.vdf" >nul 2>&1 +del "%SteamPath%\ssfn*" >nul 2>&1 + +echo Steam has been logged out successfully. +echo You will need to manually start Steam and log in again. \ No newline at end of file