From 059366bc4458136471b7976cb5df3eba35ade536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 31 Oct 2020 00:16:55 +0100 Subject: Abort start if shift is held (requires shiftdown) --- minecraft | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'minecraft') 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() { -- cgit v1.2.3