When an egg has an update script, customers can trigger it through a button on the client area.
Most steamcmd based eggs automatically update when the server starts. But if you want to switch to manual updates, this is an example script for a Garry's Mod egg. You can edit this update script to work with a lot of games very easily.
#!/bin/bash apt -y update apt -y --no-install-recommends install curl lib32gcc1 ca-certificates # Server Files: /mnt/server cd /mnt/server/steamcmd # SteamCMD fails otherwise for some reason, even running as root. # This is changed at the end of the install process anyways. chown -R root:root /mnt export HOME=/mnt/server # Optional if you want to add functionality to the beta toggle if [ "$BETA" = true ]; then echo "Updating to beta branch..." ./steamcmd.sh +login anonymous +force_install_dir /mnt/server +app_update 4020 validate -beta dev +quit else echo "Updating to normal branch..." ./steamcmd.sh +login anonymous +force_install_dir /mnt/server +app_update 4020 validate -beta public +quit fi echo "Done."
With the script example above, you need to set the appropriate container and entrypoint.
You'll want to make sure you disable the automatic updates in the egg, continuing to use Garry's Mod as our example: you can disable automatic updates by adding
auto_update 0 into the servers startup parameters. You can make this an optional startup parameter or hardcode it into the egg to disable updates by default for all servers.
Example of the flag in use