diff options
author | John Ankarström <john@ankarstrom.se> | 2020-10-31 00:16:55 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-10-31 00:16:55 +0100 |
commit | 059366bc4458136471b7976cb5df3eba35ade536 (patch) | |
tree | 826d249e16f9efb9a63b9e70f950fa70c567970e | |
parent | acb068de4fd2cd37a8a0ac406f8a0eeed4fd5380 (diff) | |
download | alpine-059366bc4458136471b7976cb5df3eba35ade536.tar.gz |
Abort start if shift is held (requires shiftdown)
-rw-r--r-- | minecraft | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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() { |