GameServerManagers / GameServerManagers/LinuxGSM

Properly check for uMod updates

Open
#2,768 0 comments 0 reactions 0 assignees View on GitHub
command: mods game: Rust
Dominant language
Shell
Stars
4.9k
Forks
864
PR merge metrics
No merged PRs in 30d

Description

For Rust (and likely other games) LinuxGSM simply downloads a new instance of uMod whether the current is up-to-date or not. I would like to see LinuxGSM properly check the version and only update when necessary. This update should also occur when the game server auto-updates (or shortly after).

A JSON file is available for parsing: https://umod.org/games/rust/latest.json

## Basic info

* **Distro:** Ubuntu Server 18 LTS
* **Game:** Rust (+others that use uMod)
* **Command:** update/auto-update
* **LinuxGSM version:** (latest)

## Further Information

When Rust updates, I find that the mods always break because uMod is never updated. This is easily fixed by manually updating umod and restarting the server.

LinuxGSM could easily track and keep the local version up-to-date by checking the uMod latest version (https://umod.org/games/rust/latest.json).

I wrote a very basic script to track my uMod server:

```
#!/bin/bash

latest=$(/usr/bin/curl -s 'https://umod.org/games/rust/latest.json' | jq -r '.version')
current=$(/bin/cat umod_cur_ver)

echo "Latest uMod: $latest"
echo "Local uMod: $current";

if [ "$latest" != "$current" ]; then
echo "uMod out of date!";
~/rustserver mods-update;
echo $latest > umod_cur_ver;
/usr/bin/curl -o ~/serverfiles/RustDedicated_Data/Managed/Oxide.Ext.RustIO.dll http://playrust.io/latest

else
echo "Current uMod is already up-to-date.";
fi
```

As an alternative, provide hooks for developers to automatically run custom scripts on when certain LinuxGSM events occur.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.