Legionofone

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Legionofone

  1. I wrote a quick bash script to update the server, it checks the logs from the last reboot and finds the version then checks steamcmd for the latest version. If the SteamCMD is higher it reboots the docker. Use at your own risk. #!/bin/bash current_version=$( docker exec Valheim cat /serverdata/serverfiles/Steam/logs/content_log.txt | grep BuildID | tail -1 | sed "s/^.\+BuildID \([0-9]\+\).*/\1/"| xargs printf '%d' ) new_version=$( curl -s -N -X GET 'https://api.steamcmd.net/v1/info/896660' | jq '.data."896660".depots.branches.public.buildid'| xargs printf '%d' ) if (( $current_version<$new_version )) then docker restart Valheim else echo "Nothing to do here boss" fi I set it up to run hourly in the user scripts plugin. If anyone knows a better way to write this please do, I am a bash newbie.