From ee5589bac0e7cb2bd8aa1026d31e21ed9c505561 Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Fri, 20 Jul 2012 05:01:20 +0100 Subject: [PATCH] Prevented save commands being sent to a stopped server in ` worlds to disk`. Before this fix, if the server was stopped the command would output 'Server "name" is not running.' multiple times. --- init/msm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/init/msm b/init/msm index 6164061..7b92161 100755 --- a/init/msm +++ b/init/msm @@ -1990,10 +1990,16 @@ command_server_worlds_ram() { # Synchronises all inram worlds back to disk for an individual server # $1: The server ID command_server_worlds_todisk() { - server_save_off "$1" - server_save_all "$1" + if server_is_running "$1"; then + server_save_off "$1" + server_save_all "$1" + fi + server_worlds_to_disk "$1" - server_save_on "$1" + + if server_is_running "$1"; then + server_save_on "$1" + fi } # Makes a backup of all worlds for an individual server