2 # Copyright 1999-2006 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 PIDFILE=/var/run/teeworlds.pid
6 GAME_DIRECTORY=/usr/games/bin
7 CONFIG=/etc/teeworlds/teeworlds_srv.cfg
14 if [ ! -e ${CONFIG} ] ; then
15 eerror "You need an ${CONFIG} config file to run TeeWorlds"
21 ebegin "Starting TeeWorlds"
22 start-stop-daemon --start --background --pidfile "${PIDFILE}" --make-pidfile -d ${GAME_DIRECTORY} --chuid teeworlds --exec ${GAME_DIRECTORY}/teeworlds_srv \
28 ebegin "Reloading TeeWorlds configs and restarting processes"
29 start-stop-daemon --stop --oknodo --chuid teeworlds --pidfile "${PIDFILE}" --signal HUP --exec ${GAME_DIRECTORY}/teeworlds_srv -- -f ${CONFIG}
34 ebegin "Stopping TeeWorlds"
35 start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"