diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-07 20:09:46 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-07 20:09:46 -0800 |
commit | 2a6616793bdcbe3ce645323b71defd820756bbfd (patch) | |
tree | b9250d2b5eae26608cae53e0b521a266a7cddca6 /bin/restart-world | |
parent | e6ece9ca854958d847ae4c66fac21a225df3c60a (diff) | |
download | tools-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-x | bin/restart-world | 28 |
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 |