#!/bin/sh

running=yes
while [[ $running = yes ]] ; do
    /usr/games/bin/netpanzer --game_config=/etc/netpanzer-ded.ini -d $@
    if [[ $? -ge 128 ]] ; then
        echo "`date`: Restarting server after crash"
        # wait a bit to not blow cpu and logfiles on constant crashs
        sleep 30
    else
        #normal exit
        running=no
    fi
done

