diff --git a/Dockerfile b/Dockerfile index 4d13b8c..e36996e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ EXPOSE 19005 $PORT_NUM COPY . /usr/src/server WORKDIR /usr/src/server -ENTRYPOINT ["/init.sh", $PORT_NUM, $CS_NAME] +ENTRYPOINT ["./init.sh", $PORT_NUM, $CS_NAME] RUN mkdir /data RUN mkdir /data/logs diff --git a/init.lock b/init.lock new file mode 100644 index 0000000..e69de29 diff --git a/init.sh b/init.sh index a9366cc..2187428 100755 --- a/init.sh +++ b/init.sh @@ -1,5 +1,8 @@ #!/bin/sh PORT_NUM=$1 CS_NAME=$2 -echo server-port=$PORT_NUM >> server.properties -echo " Name: $CS_NAME" >> plugins/gFeatures/Config.yml +if [ ! -f "init.lock" ]; then + echo server-port=$PORT_NUM >> server.properties + echo " Name: $CS_NAME" >> plugins/gFeatures/Config.yml + touch init.lock +fi