summaryrefslogtreecommitdiff
path: root/bin/restart-world
blob: 7fead17f7fbcba0def53cb4d0698703a35551b61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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