#!/bin/bash -e
# Stop running game server

fatal() { echo "FATAL: $@"; exit 1; }

conf=/etc/gameserver/gameserver
[[ -f "$conf" ]] || fatal "Conf file ($conf) not found."
. $conf
runuser -l "gameuser" -c "~/gameserver/${GAME}server stop"
