add mod support
This commit is contained in:
parent
628aa462ea
commit
cfbb458003
4 changed files with 22 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
cluster_token.txt
|
||||
docker-compose.yml
|
||||
server/
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ RUN apt-get update
|
|||
RUN apt-get install -y libcurl4-gnutls-dev:i386
|
||||
EXPOSE 11000 11000/udp 27018 27018/udp 8768
|
||||
EXPOSE 8768/udp
|
||||
COPY conf/ /home/steam/.klei/DoNotStarveTogether/Zom.bi
|
||||
#COPY conf/ /home/steam/.klei/DoNotStarveTogether/Zom.bi
|
||||
RUN chown -R steam ~steam
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +xr /entrypoint.sh
|
||||
USER steam
|
||||
USER root
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
@ -6,7 +6,7 @@ services:
|
|||
stdin_open: true
|
||||
tty: true
|
||||
environment:
|
||||
- "DST_CLUSTER_TOKEN=setmesetmesetmesetmesetme"
|
||||
- "DST_CLUSTER_TOKEN=keykeykeykeykeykeykeykeykeykeykeykey"
|
||||
- "DST_GAME_MODE=survival"
|
||||
- "DST_MAX_PLAYERS=6"
|
||||
- "DST_PVP=false"
|
||||
|
@ -15,13 +15,15 @@ services:
|
|||
- "DST_CLUSTER_NAME=Contained world"
|
||||
- "DST_CLUSTER_INTENTION=cooperative"
|
||||
- "DST_CLUSTER_PASSWORD=set"
|
||||
# seperate multiple mods with a space (for example "DST_MODS=375859599 378160973")
|
||||
- "DST_MODS="
|
||||
|
||||
ports:
|
||||
- 11000:11000
|
||||
- 11000:11000/udp
|
||||
- 27018:27018
|
||||
- 27018:27018/udp
|
||||
- 8768
|
||||
#volumes:
|
||||
#- server:/home/steam/.klei/DoNotStarveTogether/
|
||||
#- /data/steam-games/:/home/steam/games/:rw
|
||||
volumes:
|
||||
- ./server:/home/steam/.klei/DoNotStarveTogether/server
|
||||
|
||||
|
|
|
@ -116,6 +116,19 @@ then
|
|||
fi
|
||||
|
||||
|
||||
#mod support
|
||||
if [[ ! -z "$DST_MODS" ]]
|
||||
then
|
||||
echo $DST_MODS |sed -e "s/ /\n/g" |sed -e "s/^/ServerModSetup\(\"/g"| sed -e "s/$/\"\)/g" > $installdir/mods/dedicated_server_mods_setup.lua
|
||||
echo "return {" > ${dontstarve_dir}/${DST_SERVER_DIR}/Master/modoverrides.lua
|
||||
echo "return {" > ${dontstarve_dir}/${DST_SERVER_DIR}/Caves/modoverrides.lua
|
||||
|
||||
echo $DST_MODS |sed -e "s/ /\n/g" |sed -e "s/^/\[\"workshop-/g"| sed -e "s/$/\"\] \= \{ enabled \= true \}\,/g" >> ${dontstarve_dir}/${DST_SERVER_DIR}/Master/modoverrides.lua
|
||||
echo $DST_MODS |sed -e "s/ /\n/g" |sed -e "s/^/\[\"workshop-/g"| sed -e "s/$/\"\] \= \{ enabled \= true \}\,/g" >> ${dontstarve_dir}/${DST_SERVER_DIR}/Caves/modoverrides.lua
|
||||
echo "}" >> ${dontstarve_dir}/${DST_SERVER_DIR}/Master/modoverrides.lua
|
||||
echo "}" >> ${dontstarve_dir}/${DST_SERVER_DIR}/Caves/modoverrides.lua
|
||||
fi
|
||||
|
||||
# run the next commands from the installdir
|
||||
cd $installdir/bin
|
||||
|
||||
|
|
Loading…
Reference in a new issue