aboutsummaryrefslogtreecommitdiff
path: root/scripts/runMinecraft.sh
diff options
context:
space:
mode:
authorojhern24 <github@mail.tysonth.com>2023-05-05 18:52:09 -0400
committerojhern24 <github@mail.tysonth.com>2023-05-05 18:52:09 -0400
commit6da779d59fa6b7351cffdf888898fce8b40fa65f (patch)
tree961b05c76ef3c59610578fe54481c6fd7f49d0b3 /scripts/runMinecraft.sh
downloadDiscordGameServerManager-6da779d59fa6b7351cffdf888898fce8b40fa65f.zip
Refresh of old repository
Diffstat (limited to 'scripts/runMinecraft.sh')
-rw-r--r--scripts/runMinecraft.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/runMinecraft.sh b/scripts/runMinecraft.sh
new file mode 100644
index 0000000..9d09583
--- /dev/null
+++ b/scripts/runMinecraft.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+screen -d -m -S minecraft bash -c 'touch .running; cd; cd directory/to/your/minecraft/server; ./start.sh; cd; cd directory/to/dgsm/bot; rm .running; exit; exec bash'
+
+# In Layman's terms:
+
+# [Before server starts]
+# Open a virtual terminal with the name 'minecraft', create a hidden file called '.running', go to home directory, go to minecraft server directory,
+# execute server initialization script (MUST HAVE EXECUTE PERMISSIONS)
+
+# [After server shuts down]
+# Go to root directory, go to this Discord bot's directory, delete '.running' file so that the $run command can be used once again, exit the virtual terminal so that
+# this current session is terminated and there are not multiple terminals named 'minecraft'
+
+# i hope this makes sense