This commit is contained in:
+27
-1
@@ -12,7 +12,33 @@ prepare_volume() {
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_steam_volume() {
|
||||
path="$1"
|
||||
marker="$path/.progression-steam-owner-v2"
|
||||
|
||||
# SteamCMD starts as root in this container, but its Linux filesystem
|
||||
# workers use the account that owns the SteamCMD installation. Keep both
|
||||
# its HOME and Workshop library writable by that account.
|
||||
mkdir -p \
|
||||
/home/progression/Steam/logs \
|
||||
"$path/workshop/content/294100"
|
||||
chown -R progression:progression /home/progression
|
||||
|
||||
if [ ! -e "$marker" ]; then
|
||||
echo "Preparing persistent Steam library for SteamCMD: $path"
|
||||
chown -R progression:progression "$path"
|
||||
touch "$marker"
|
||||
chown progression:progression "$marker"
|
||||
else
|
||||
chown progression:progression \
|
||||
"$path" \
|
||||
"$path/workshop" \
|
||||
"$path/workshop/content" \
|
||||
"$path/workshop/content/294100"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_volume /srv/progression/.data
|
||||
prepare_volume /srv/steam-library/steamapps
|
||||
prepare_steam_volume /srv/steam-library/steamapps
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user