]> git.xonotic.org Git - xonotic/xonotic.git/blob - server/server_linux.sh
xonotic-map-compiler: forbid "evil" dirs too
[xonotic/xonotic.git] / server / server_linux.sh
1 #!/bin/sh
2
3 case "$(uname -m)" in
4   x86_64)       executable="xonotic-linux-x86_64-dedicated" ;;
5   *)            executable="xonotic-linux-686-dedicated" ;;
6 esac
7
8 cd "`dirname "${0}"`"
9
10 if ! [ -x "$executable" ]; then
11         if [ -x "../$executable" ] && { [ -f ~/.xonotic/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 Xonotic installation"
19                 exit 1
20         fi
21 fi
22
23 exec ./${executable} +serverconfig server.cfg "${@}"