]> git.lizzy.rs Git - elidragon_v2.git/blobdiff - scripts/stop.sh
Update scripts to make mapserver function properly the first time
[elidragon_v2.git] / scripts / stop.sh
index 8297ddc1e2c455cb7e4a9cc3eaae7b8e30f164f9..e83300ed0f3b72d5193805eb9693fa4eace6fb11 100755 (executable)
@@ -1,10 +1,25 @@
 #! /bin/bash
 # Elidragon v2 stop script
-# Stop one or all worlds, or if --multiserver is used, the multiserver. If all worlds are stopped, multiserver is stopped as well
-# Arguments: [<worldname>]
+# Stop worlds, multiserver and mapserver
 
 source scripts/common.sh
 
-if [[ $1 == "--multiserver" || run_one_or_all stop_world $1 ]]; then
-       stop_multiserver
-fi
+case $1 in
+       "--all")
+               loop_worlds stop_world
+               stop_multiserver
+               stop_mapserver
+               ;;
+       "--worlds")
+               loop_worlds stop_world
+               ;;
+       "mapserver")
+               stop_mapserver
+               ;;
+       "multiserver")
+               stop_multiserver
+               ;;
+       *)
+               stop_world $1
+               ;;
+esac