Hey Salad, you are looking for something like this...
#!/bin/bash
# serverscript.sh
(
# Inside parenthese, and therefore a subshell
while [ 1 ] # Endless loop
do
echo "Teeworlds Server started..."
./teeworlds_srv -f defaultserver.txt
done
)
exit $? # End of script but will never get here
And then you proceed to run the script in the directory with...
Not sure why Botox suggests adding a user and multiple script files, etc. The script above will never end unless you kill the process. Every time teeworlds crashes it loops back up and starts it again with the config file you provided.