summaryrefslogtreecommitdiff
path: root/tools/bin/restart-world
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bin/restart-world')
-rwxr-xr-xtools/bin/restart-world28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/bin/restart-world b/tools/bin/restart-world
new file mode 100755
index 00000000..7fead17f
--- /dev/null
+++ b/tools/bin/restart-world
@@ -0,0 +1,28 @@
+#!/bin/bash -e
+cd "$1"
+shift
+
+source restart-config
+
+for ARG
+do
+ if [ "$ARG" = --auto ]
+ then
+ PULL=y
+ elif [ "$ARG" = --manual ]
+ then
+ PULL=
+ else
+ echo unknown argument
+ exit 1
+ fi
+done
+
+if test -n "$PULL"
+then
+ git pull
+ (cd world/map/conf; cat magic.conf.template | ./spells-build > magic.conf)
+fi
+
+restart-pid char-server
+restart-pid map-server