summaryrefslogtreecommitdiff
path: root/bin/restart-world
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-12-07 20:09:46 -0800
committerBen Longbons <b.r.longbons@gmail.com>2012-12-07 20:09:46 -0800
commit2a6616793bdcbe3ce645323b71defd820756bbfd (patch)
treeb9250d2b5eae26608cae53e0b521a266a7cddca6 /bin/restart-world
parente6ece9ca854958d847ae4c66fac21a225df3c60a (diff)
downloadtools-2a6616793bdcbe3ce645323b71defd820756bbfd.tar.gz
tools-2a6616793bdcbe3ce645323b71defd820756bbfd.tar.bz2
tools-2a6616793bdcbe3ce645323b71defd820756bbfd.tar.xz
tools-2a6616793bdcbe3ce645323b71defd820756bbfd.zip
Add restart scripts as used on the test server.
Diffstat (limited to 'bin/restart-world')
-rwxr-xr-xbin/restart-world28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/restart-world b/bin/restart-world
new file mode 100755
index 0000000..7fead17
--- /dev/null
+++ b/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