Skip to content
Snippets Groups Projects
Commit 214af18e authored by tmueller's avatar tmueller
Browse files

Restore should now wait for user input

parent 81dd6ed2
No related branches found
No related tags found
No related merge requests found
Pipeline #2791 passed
...@@ -66,24 +66,28 @@ while true ...@@ -66,24 +66,28 @@ while true
if [ ${SCRUN} = 0 ] if [ ${SCRUN} = 0 ]
then # Server läuft, zeige letzte zeilen vom log an... then # Server läuft, zeige letzte zeilen vom log an...
clear # Aber erstmal sauber machen ^^ clear # Aber erstmal sauber machen ^^
echo -n "Latest Log:"
tail /papermc/logs/latest.log tail /papermc/logs/latest.log
echo -n "Befehle: (help für Hilfe)"
read befehl read befehl
case $befehl in case $befehl in
backup) backup)
screen -r mc -p 0 -X stuff "stop^M" echo -n "Backup started..."
bash backup.sh bash /backup.sh
;; ;;
stop) stop)
exec_stop exec_stop
;; ;;
restart) restart)
screen -r mc -p 0 -X stuff "stop^M" screen -r mc -p 0 -X stuff "stop^M"
start_server
;; ;;
restore) restore)
echo -n "Der Server wird gestoppt und das Restore-Script gestartet..."
screen -r mc -p 0 -X stuff "stop^M" 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" "\n## Please download Plugins and then start the container again. Press any key to continue"
read read -p "weiter mit Enter"
;; ;;
console | con | tty) console | con | tty)
echo -n "Zum verlassen STRG + A + D drücken" echo -n "Zum verlassen STRG + A + D drücken"
...@@ -99,6 +103,9 @@ while true ...@@ -99,6 +103,9 @@ while true
ram) ram)
screen -r mc -p 0 -X stuff "lag^M" 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" echo -n "Befehl nicht erkannt"
;; ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment