#!/bin/sh USER_SHELL="${USER_SHELL:-/bin/ash}" # UID and GID used by the user inside of the container USER_UID="${USER_UID:-3500}" USER_GID="${USER_GID:-3500}" TRUSTED_CIDRS="${TRUSTED_CIDRS:-127.0.0.1/8}" # LISTEN="${LISTEN:-:8899}" username="steam" userhome="/steam" # This is only run once in the container's lifetime unless /setup is removed setup() { if [ -e /setup ] ; then return ; fi addgroup -g "${USER_GID}" "$username" adduser -h "$userhome" --gecos "$FULL_NAME" -D \ -s "${USER_SHELL}" -u "${USER_UID}" -G "$username" "$username" passwd -u "$username" touch /setup } run_steam_export() { mkdir -p /steam-lib/common chown -R "$username:$username" /steam chown -R "$username:$username" /steam-lib su steam -c "steam-export -demo -L /steam-lib -t \"$TRUSTED_CIDRS\" -s \"$SHARE_LINK\"" } setup run_steam_export