Automatically repairs and updates troublesome LGSM Rust servers
This script automates the process of repairing and updating your Rust LGSM server. It performs the following tasks:
- Disables the crontab.
- Stops the Rust server.
- Updates the Rust server.
- Runs mods-update (umod update).
- Re-enables the crontab.
- Starts the Rust server.
You must define USER and RUST_SERVER_DIR
# Define your Rust LGSM server directory
RUST_SERVER_DIR="/home/yourusername/lgsm/rustserver"
# Define User
USER="yourusername"
Follow these steps to use the script:
- Login/SSH into server as the rust user
- Run
./rustserver_repair.sh
Follow these steps to install the script:
-
Download the Script: Download the script
rustserver_repair.sh
from this repository. -
Navigate to Your Server Directory: Open a terminal and navigate to the directory where your Rust LGSM server is installed. You can use the
cd
command to change directories. Replaceyourusername
with your actual username.cd /home/yourusername/lgsm/rustserver
-
Make the Script Executable: Make the script executable using the
chmod
command:chmod +x rustserver_repair.sh
-
Run the Script: Execute the script to perform the repair and wipe tasks:
./rustserver_repair.sh
-
Completion: Once the script completes successfully, your Rust server should be repaired, updated, and starting.
-
Replace
yourusername
with your actual username in the commands as needed. -
Ensure that the script file
rustserver_repair.sh
is located in the correct directory where your Rust LGSM server files are installed. -
This script is designed for modded Rust servers running the Umod/Oxide framework.
-
Use this script at your own risk and make sure to take backups of your server data before running it.
Please report any issues or provide feedback on this script.