update setup instructions

This commit is contained in:
Matthew Tran
2024-09-16 22:19:00 +00:00
parent 2107249f47
commit 7f7367c74d
4 changed files with 71 additions and 62 deletions
+13 -2
View File
@@ -1,5 +1,16 @@
#!/bin/sh
# TODO graceful exit
cleanup() {
echo "stop" > cmd
}
LD_LIBRARY_PATH=. ./bedrock_server
trap 'cleanup' TERM
rm cmd
mkfifo cmd
LD_LIBRARY_PATH=. ./bedrock_server < cmd &
echo "help" > cmd # shell waits for FIFO to be opened for writing before starting program!
wait $! # wait for SIGTERM
wait $! # wait for server to stop
# TODO stop not working