LinuxGSM FiveM

Hello,

I am the lead developer of LinuxGSM and my top request currently is to add support for FiveM. I have been doing some initial testing and can’t see how to either auto-update the server or how to check the server version.

The only method I have seen for updating servers appears to be manually downloading fx server and cfx-server-data.

game servers that require updates that a non steam based commonly have a json file that returns the latest available version and a URL to download it. I typically use this to then compare against the locally installed version. If they don’t match LinuxGSM downloads the latest version and installs it.

So my question is how do people typically update their servers and is there an automated solution available? and If not are auto-updates in the development pipeline?

Thank you

From discussions I’ve seen in the past, what people seem to be doing now is checking the directory of where the server repos are and determining the latest date modified/added. @tabarra might be of some more assistance on this topic.

1 Like

I have a bash script, that checks the latest stable linux artifact, downloads it and write the version number to a file called version, if the artifact version deviates from the one in the file.

Snippet from my FiveM startup script:

build_link="`wget -qO - https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/ | grep 'class=\"button is-link is-primary\">'| sed -r 's/.*href=\".\/([^\"]+).*/\1/g' | head -n1`"
build_link=`echo $build_link | awk '{print $1}'`
version=`echo "$build_link" | grep -o -E '[0-9]+' | head -1 | sed -e 's/^0\+//'`

test -f "/home/ec2-user/FiveM/current_version" || touch "/home/ec2-user/FiveM/current_version"

if ! grep -q "$version" /home/ec2-user/FiveM/current_version; then
   `echo "$version" > "/home/ec2-user/FiveM/current_version"`
   wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/"$build_link" -O /home/ec2-user/FiveM/fx.tar.xz
   sudo rm -rf /home/ec2-user/FiveM/alpine
   sudo tar -xf /home/ec2-user/FiveM/fx.tar.xz -C /home/ec2-user/FiveM
   sudo rm -rf /home/ec2-user/FiveM/fx.tar.xz
fi