echo-rcon.pl now allows multiple instances of rcon2irc on the same server, bans.pl...
[divverent/nexuiz.git] / server / server_linux.sh
1 #!/bin/sh
2
3 case "$(uname -m)" in
4   x86_64)       executable="nexuiz-linux-x86_64-dedicated" ;;
5   *)            executable="nexuiz-linux-686-dedicated" ;;
6 esac
7
8 cd "`dirname "${0}"`"
9
10 if ! [ -x "$executable" ]; then
11         if [ -x "../$executable" ] && { [ -f ~/.nexuiz/data/server.cfg ] || [ -f ../data/server.cfg ]; }; then
12                 cd ..
13         else
14                 echo "This script is not properly set up yet."
15                 echo "Please refer to the instructions in readme.txt."
16                 echo "In short:"
17                 echo "- copy server.cfg to the data directory and adjust its settings"
18                 echo "- move this file to the main directory of your Nexuiz installation"
19                 exit 1
20         fi
21 fi
22
23 exec ./${executable} +serverconfig server.cfg "${@}"