blob: e060597c95c100e86ec3b1a9e19222f225118d38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/sh
USER_SHELL="${USER_SHELL:-/bin/ash}"
# UID and GID used by the `git` 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
|