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
|
cluster_token.txt
|
||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
|
server/
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@ RUN apt-get update
|
||||||
RUN apt-get install -y libcurl4-gnutls-dev:i386
|
RUN apt-get install -y libcurl4-gnutls-dev:i386
|
||||||
EXPOSE 11000 11000/udp 27018 27018/udp 8768
|
EXPOSE 11000 11000/udp 27018 27018/udp 8768
|
||||||
EXPOSE 8768/udp
|
EXPOSE 8768/udp
|
||||||
COPY conf/ /home/steam/.klei/DoNotStarveTogether/Zom.bi
|
#COPY conf/ /home/steam/.klei/DoNotStarveTogether/Zom.bi
|
||||||
RUN chown -R steam ~steam
|
RUN chown -R steam ~steam
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +xr /entrypoint.sh
|
RUN chmod +xr /entrypoint.sh
|
||||||
USER steam
|
USER root
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
|
@ -6,7 +6,7 @@ services:
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
environment:
|
environment:
|
||||||
- "DST_CLUSTER_TOKEN=setmesetmesetmesetmesetme"
|
- "DST_CLUSTER_TOKEN=keykeykeykeykeykeykeykeykeykeykeykey"
|
||||||
- "DST_GAME_MODE=survival"
|
- "DST_GAME_MODE=survival"
|
||||||
- "DST_MAX_PLAYERS=6"
|
- "DST_MAX_PLAYERS=6"
|
||||||
- "DST_PVP=false"
|
- "DST_PVP=false"
|
||||||
|
@ -15,13 +15,15 @@ services:
|
||||||
- "DST_CLUSTER_NAME=Contained world"
|
- "DST_CLUSTER_NAME=Contained world"
|
||||||
- "DST_CLUSTER_INTENTION=cooperative"
|
- "DST_CLUSTER_INTENTION=cooperative"
|
||||||
- "DST_CLUSTER_PASSWORD=set"
|
- "DST_CLUSTER_PASSWORD=set"
|
||||||
|
# seperate multiple mods with a space (for example "DST_MODS=375859599 378160973")
|
||||||
|
- "DST_MODS="
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- 11000:11000
|
- 11000:11000
|
||||||
- 11000:11000/udp
|
- 11000:11000/udp
|
||||||
- 27018:27018
|
- 27018:27018
|
||||||
- 27018:27018/udp
|
- 27018:27018/udp
|
||||||
- 8768
|
- 8768
|
||||||
#volumes:
|
volumes:
|
||||||
#- server:/home/steam/.klei/DoNotStarveTogether/
|
- ./server:/home/steam/.klei/DoNotStarveTogether/server
|
||||||
#- /data/steam-games/:/home/steam/games/:rw
|
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,19 @@ then
|
||||||
fi
|
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
|
# run the next commands from the installdir
|
||||||
cd $installdir/bin
|
cd $installdir/bin
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue