added init file

master
EspiDev 7 years ago
parent 4608f2c6b8
commit ef5299ffac

@ -5,15 +5,18 @@ MAINTAINER EstiNet
ARG PORT_NUM ARG PORT_NUM
ENV PORT_NUM ${PORT_NUM:-10100} ENV PORT_NUM ${PORT_NUM:-10100}
ARG CS_NAME
ENV CS_NAME ${CS_NAME:-CTF1}
EXPOSE 19005 $PORT_NUM EXPOSE 19005 $PORT_NUM
COPY . /usr/src/server COPY . /usr/src/server
WORKDIR /usr/src/server WORKDIR /usr/src/server
RUN echo server-port=$PORT_NUM >> server.properties RUN chmod +x init.sh
RUN mkdir /data RUN mkdir /data
RUN mkdir /data/logs RUN mkdir /data/logs
RUN mkdir /data/plugins RUN mkdir /data/plugins
CMD exec ./esticonsole CMD ./init.sh && ./esticonsole

@ -0,0 +1,10 @@
#!/bin/sh
echo "Initializing..."
if [ ! -f "init.lock" ]; then
echo "Adding log..."
echo server-port=$PORT_NUM >> server.properties
echo " Name: $CS_NAME" >> plugins/gFeatures/Config.yml
touch init.lock
fi
exit 0

@ -33,8 +33,7 @@ Config:
Password: pass123 Password: pass123
State: 'false' State: 'false'
ClioteSky: ClioteSky:
Address: 192.168.2.60 Address: '192.168.2.60'
Port: '36000' Port: '36000'
Category: CTF Category: CTF
Name: CTF1
Enable: 'true' Enable: 'true'

Loading…
Cancel
Save