Skip to content

Commit

Permalink
enhancement: resonite headless shuts down gracefully now
Browse files Browse the repository at this point in the history
  • Loading branch information
bredo228 committed Jul 18, 2024
1 parent e4bfacf commit 81cf436
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ RUN apt update \
&& apt install curl lib32gcc-s1 libfreetype6 -y \
&& useradd -m -d /home/container -s /bin/bash container

COPY ./entrypoint.sh /entrypoint.sh
COPY ./scripts /scripts

RUN chmod +x /entrypoint.sh
RUN chmod +x /scripts/*

RUN mkdir /Logs \
&& chown -R container:container /Logs
Expand All @@ -28,4 +27,5 @@ WORKDIR /home/container

STOPSIGNAL SIGINT

ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/scripts/update-resonite.sh"]
CMD ["/scripts/launch-resonite.sh"]
2 changes: 2 additions & 0 deletions scripts/launch-resonite.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

echo FUCK!

rm -r /home/container/Headless/Data
rm -r /home/container/Headless/Cache
find /Logs -type f -name *.log -atime +${LOG_RETENTION:-30} -delete
Expand Down
6 changes: 0 additions & 6 deletions scripts/setup-steamcmd.sh

This file was deleted.

9 changes: 9 additions & 0 deletions scripts/update-resonite.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/sh

if [ ! -d "/home/container/steamcmd" ]; then
echo Installing steamcmd
mkdir -p /home/container/steamcmd
curl -sSL -o /tmp/steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xf /tmp/steamcmd.tar.gz --directory /home/container/steamcmd
fi

HEADLESS_DIRECTORY="/home/container/Headless/net8.0"

/home/container/steamcmd/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} +force_install_dir /home/container +app_update 2519830 -beta ${STEAM_BRANCH} -betapassword ${BETA_CODE} +quit
Expand All @@ -23,3 +30,5 @@ if [ "${ENABLE_MODS}" = "true" ]; then
curl -SslL https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest/download/ResoniteModLoader.dll -o ${HEADLESS_DIRECTORY}/Libraries/ResoniteModLoader.dll

fi

exec $*

0 comments on commit 81cf436

Please sign in to comment.