A small python script to purge corrupted lancache entries for Steam and Epic Games.
This script reads the "access.log" created by "Monolithic Game Download Cache Docker Container" to identify files which are corrupted. Corrupted files will be requested multiple times. If the script detects a file being requested five times in a row, it will purge the file from the cache.
- Tailer Python Module
- Must be executed on machine running "Monolithic Game Download Cache Docker Container".
sudo apt update && sudo apt install python3 python3-pip -y && pip3 install tailer
- Only watches "access.log" for "Steam" and "Epic Games" cache files.
File paths for the cache folder need to be changed in "main.py" if they differ from the default install of the "Monolithic Game Download Cache Docker Container".
Follow these instructions to set up the Lancache Maintainer as a systemd service on your Linux system.
Before setting up the service, you need to modify the lancache-maintainer.service file to match your system's configuration, specifically the username and the path to the script.
Open the lancache-maintainer.service file in a text editor. Locate the line that starts with 'User=' and replace 'anthony' with your actual username. Make sure the 'ExecStart' and 'WorkingDirectory' paths are correct for your setup. Save and close the file after making these changes.
Copy the modified service file to the /etc/systemd/system/ directory. This requires superuser privileges.
sudo cp lancache-maintainer.service /etc/systemd/system/lancache-maintainer.service
After copying the service file, reload the systemd manager configuration to recognize the new service.
sudo systemctl daemon-reload
To have the Lancache Maintainer service start automatically at boot, enable it using the following command:
sudo systemctl enable lancache-maintainer.service
Start the Lancache Maintainer service with:
sudo systemctl start lancache-maintainer.service
Verify that the service is running properly:
sudo systemctl status lancache-maintainer.service
If the service is active and running, you have successfully set up the Lancache Maintainer service. If you encounter any errors, check the service's logs for more details:
sudo journalctl -u lancache-maintainer.service
If the service fails to start, ensure that your Python script is executable and working correctly when run manually.
Verify that all paths in the lancache-maintainer.service file are correct and accessible by the user specified in the service file.
For issues related to Python dependencies, ensure that all required packages are installed in the environment that the script is running in.