You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
printf"Current user is not root (%s)\\nPass your user and group to the container using the PGID and PUID environment variables\\nDo not use the --user flag (or user: field in Docker Compose)\\n""$CURRENTUID"
printf"Checking available memory...%sGB detected\\n""$ramAvailable"
29
-
30
-
if [[ "$ramAvailable"-lt 12 ]];then
31
-
printf"You have less than the required 12GB minmum (%sGB detected) of available RAM to run the game server.\\nIt is likely that the server will fail to load properly.\\n""$ramAvailable"
31
+
printf"Checking available memory...%sGB detected\\n""$RAMAVAILABLE"
32
+
if [[ "$RAMAVAILABLE"-lt 12 ]];then
33
+
printf"You have less than the required 12GB minmum (%sGB detected) of available RAM to run the game server.\\nIt is likely that the server will fail to load properly.\\n""$RAMAVAILABLE"
32
34
fi
33
35
34
36
mkdir -p \
@@ -41,8 +43,6 @@ mkdir -p \
41
43
"${GAMESAVESDIR}/server" \
42
44
||exit 1
43
45
44
-
NUMCHECK='^[0-9]+$'
45
-
46
46
# check if the user and group IDs have been set
47
47
if! [[ "$PGID"=~$NUMCHECK ]] ;then
48
48
printf"Invalid group id given: %s\\n""$PGID"
@@ -60,7 +60,17 @@ elif [[ "$PUID" -eq 0 ]]; then
60
60
exit 1
61
61
fi
62
62
63
-
groupmod -g "$PGID" steam
64
-
usermod -u "$PUID" steam
63
+
if [[ $(getent group $PGID| cut -d: -f1) ]];then
64
+
usermod -a -G "$PGID" steam
65
+
else
66
+
groupmod -g "$PGID" steam
67
+
fi
68
+
69
+
if [[ $(getent passwd ${PUID}| cut -d: -f1) ]];then
0 commit comments