cd /usr/ports/games rm -rf warsow/ warsow-data/ tar -xvzf warsow_and_warsow-data.tgz cd warsow && make install
#!/bin/sh WSW_BINARY="/usr/local/bin/wsw_server.amd64" CHROOT_PATH="/var/warsow" while [ -x $CHROOT_PATH/$WSW_BINARY ]; do # First set up the chroot environment in /var/warsow... chroot -u warsow $CHROOT_PATH $WSW_BINARY # the sleep is good in case the above line # fails and you need to hit CTRL-C sleep 4 done echo "Cannot execute $CHROOT_PATH/$WSW_BINARY"For this to work, you need to copy all the needed files over to the new chroot directory... /var/warsow and make a user called 'warsow'. You can make the chroot directory whatever you like, and you could use 'nobody' instead of warsow, if you like.
You need a copy of ALL the warsow files and the required shared libraries in the chroot environment.
mkdir -p /var/warsow/usr/local/lib mkdir /var/warsow/usr/local/share mkdir /var/warsow/usr/local/bin mkdir /var/warsow/libexec mkdir /var/warsow/lib rsync -av /usr/local/lib/warsow /var/warsow/usr/local/lib/ rsync -av /usr/local/share/warsow /var/warsow/usr/local/share/ cp /usr/local/bin/wsw_server.amd64 /var/warsow/usr/local/bin/wsw_server.amd64
now for the shared libraries... run this command to find out what they are:
ldd /usr/local/bin/wsw_server.*If the server binary is linked to "libc.so.6" then do this
cp /lib/libc.so.6 /var/warsow/lib/I ended up needing these files:
/var/warsow/lib/libc.so.6 /var/warsow/lib/libpthread.so.2 /var/warsow/lib/libm.so.4 /var/warsow/lib/libz.so.3
You will also needed this file:
cp /libexec/ld-elf.so.1 /var/warsow/libexec/Of course, replace "wsw_server.amd64" with your binary name... could be "wsw_server.i386" or "wsw_server.x86_64".
#!/bin/sh while true; do su -m nobody -c /usr/local/bin/wsw_server.amd64 sleep 4 doneAlso, you probably want to launch your warsow server in a screen session. How To launch the server is covered in the Warsow Forums.