CPN commit
This commit is contained in:
55
gaming/lancache-delete-gamecache.bat
Normal file
55
gaming/lancache-delete-gamecache.bat
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user