aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-10-31 00:16:55 +0100
committerJohn Ankarström <john@ankarstrom.se>2020-10-31 00:16:55 +0100
commit059366bc4458136471b7976cb5df3eba35ade536 (patch)
tree826d249e16f9efb9a63b9e70f950fa70c567970e
parentacb068de4fd2cd37a8a0ac406f8a0eeed4fd5380 (diff)
downloadalpine-059366bc4458136471b7976cb5df3eba35ade536.tar.gz
Abort start if shift is held (requires shiftdown)
-rw-r--r--minecraft10
1 files changed, 8 insertions, 2 deletions
diff --git a/minecraft b/minecraft
index 33e31dc..64c786b 100644
--- a/minecraft
+++ b/minecraft
@@ -13,8 +13,14 @@ depend() {
}
start() {
- echo Starting Minecraft server...
- (cd $MCPATH && screen -h 1024 -dmS $SESSION $CMD)
+ if which shiftdown > /dev/null && shiftdown
+ then
+ echo Not starting Minecraft server because Shift is held.
+ return 1
+ else
+ echo Starting Minecraft server...
+ (cd $MCPATH && screen -h 1024 -dmS $SESSION $CMD)
+ fi
}
stop() {