Skip to content

Properly check for uMod updates #2768

@mackcoding

Description

@mackcoding

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions