From 214af18eb8f7559e9f4411e6b87e055db326c5da Mon Sep 17 00:00:00 2001
From: tmueller <tmueller@cl.uni-heidelberg.de>
Date: Thu, 8 Apr 2021 21:06:29 +0000
Subject: [PATCH] Restore should now wait for user input

---
 papermc.sh | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/papermc.sh b/papermc.sh
index b4fc9c5..982772d 100755
--- a/papermc.sh
+++ b/papermc.sh
@@ -66,24 +66,28 @@ while true
     if [ ${SCRUN} = 0 ]
       then # Server läuft, zeige letzte zeilen vom log an...
         clear # Aber erstmal sauber machen ^^
+        echo -n "Latest Log:"
         tail /papermc/logs/latest.log
+        echo -n "Befehle: (help für Hilfe)"
         read befehl
         case $befehl in
           backup)
-            screen -r mc -p 0 -X stuff "stop^M"
-            bash backup.sh
+            echo -n "Backup started..."
+            bash /backup.sh
             ;;
           stop)
             exec_stop
             ;;
           restart)
             screen -r mc -p 0 -X stuff "stop^M"
+            start_server
             ;;
           restore)
+            echo -n "Der Server wird gestoppt und das Restore-Script gestartet..."
             screen -r mc -p 0 -X stuff "stop^M"
-            bash restore.sh
+            bash /restore.sh
             "\n## Please download Plugins and then start the container again. Press any key to continue"
-            read
+            read -p "weiter mit Enter"
             ;;
           console | con | tty)
             echo -n "Zum verlassen STRG + A + D drücken"
@@ -99,6 +103,9 @@ while true
           ram)
             screen -r mc -p 0 -X stuff "lag^M"
             ;;
+          help)
+            echo -n "backup | restore | console | log | tps | ram | stop | restart"
+            ;;
           *)
             echo -n "Befehl nicht erkannt"
             ;;
-- 
GitLab