summaryrefslogblamecommitdiff
path: root/tools/bin/restart-world
blob: 7fead17f7fbcba0def53cb4d0698703a35551b61 (plain) (tree)



























                                                                              
#!/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