Skip to content

Commit

Permalink
Refactor: pipe check
Browse files Browse the repository at this point in the history
and also use help instead to show commands upon runtime
  • Loading branch information
PassiveLemon committed Jan 30, 2024
1 parent f6ed6cf commit 5b028be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ContainerTester.sh
ImagePublisher.sh
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ cp /opt/tmodloader/config/serverconfig.txt /opt/tmodloader/server/

# Start tmodloader in tmux session with a write pipe to output to docker logs
echo "|| Starting server with ${MODPACK} modpack... ||"
mkfifo $pipe
if [ ! -p "$pipe" ]; then
mkfifo $pipe
fi
tmux new-session -d "/opt/tmodloader/server/start-tModLoaderServer.sh -config /opt/tmodloader/server/serverconfig.txt | tee $pipe"

# Sometimes the server doesn't start immediately and hangs. This basically just pokes it into starting.
inject "poke"
inject "help"

# Read out pipe to display in docker logs
cat $pipe &
Expand Down

0 comments on commit 5b028be

Please sign in to comment.