]> git.lizzy.rs Git - elidragon_v2.git/blobdiff - scripts/restart.sh
Add mapserver
[elidragon_v2.git] / scripts / restart.sh
index 53a385f19e6a468b4932e9e1e2148442bba2ddd6..13b612a7a586aea47a2457685589da1b508b4125 100755 (executable)
@@ -1,10 +1,25 @@
 #! /bin/bash
 # Elidragon v2 restart script
-# Restart one or all worlds, or if --multiserver is used, the multiserver. If all worlds are restarted, multiserver is restarted as well
-# Arguments: [<worldname> | --multiserver]
+# Restart worlds, multiserver and mapserver
 
 source source scripts/common.sh
 
-if [[ $1 == "--multiserver" || run_one_or_all restart_world $1 ]]; then
-       restart_multiserver
-fi
+case $1 in
+       "--all")
+               restart_mapserver
+               restart_multiserver
+               loop_worlds restart_world
+               ;;
+       "--worlds")
+               loop_worlds restart_world
+               ;;
+       "mapserver")
+               restart_mapserver
+               ;;
+       "multiserver")
+               restart_multiserver
+               ;;
+       *)
+               restart_world $1
+               ;;
+esac