-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ae65d71
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM ubuntu:focal | ||
|
||
COPY ./smp-server-ubuntu-20_04-x86-64 /app/smp-server | ||
COPY ./entrypoint.sh /entrypoint.sh | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y openssl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app | ||
|
||
EXPOSE 5223 | ||
|
||
ENTRYPOINT [ "/bin/bash" ] | ||
CMD [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Checks initialization status | ||
if [ ! -f "/app/config/smp-server.ini" ] && [ ! -f "/etc/opt/simplex/smp-server.ini" ]; then | ||
# If no configs are present, initialize | ||
if [ "$UseIP" = true ]; then | ||
./smp-server init --ip $IP | ||
elif [ "$UseIP" = false ]; then | ||
./smp-server init -n $FQDN | ||
else | ||
echo "UseIP is not defined!! Exiting..." | ||
exit | ||
fi | ||
|
||
mv /etc/opt/simplex/* /app/config/ | ||
ln -s /app/config/* /etc/opt/simplex/ | ||
|
||
elif [ -f "/app/config/smp-server.ini" ] && [ ! -f "/etc/opt/simplex/smp-server.ini" ]; then | ||
# If existing config exists, make a symbolic link | ||
mkdir /etc/opt/simplex | ||
ln -s /app/config/* /etc/opt/simplex/ | ||
|
||
fi | ||
|
||
./smp-server start |