add minecraft service

This commit is contained in:
Matthew Tran
2023-09-06 11:12:08 +00:00
parent 1685a02f90
commit 2272e874f5
9 changed files with 112 additions and 22 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
cleanup() {
./mcrcon -p password stop
}
trap 'cleanup' TERM
java -Xmx1024M -Xms1024M -jar server.jar nogui &
wait $! # wait for SIGTERM
wait $! # wait for server to stop