Here are the scripts I use to start the server :
I run 2 servers, and so 2 scripts.
~/start-server1.sh
#!/bin/sh
#ip="192.168.0.1"
#port="27960"
name="cacatoes1"
# Which mod will we use ?
mod_name="baseoa"
#mod_name="openforts"
#mod_name="freeze"
#mod_name="animal"
#mod_name="q3pong"
#mod_name="bfpq3"
#mod_name="westernq3"
#mod_name="gridiron +set vm_game 1 +set vm_cgame 1 +set vm_ui 1 +bot_enable 0"
# Add the mod parameter or not
mod_parameter=""
if [ $mod_name != "baseoa" ]
then mod_parameter="+set fs_game $mod_name"
fi
# go !
echo Running server $name.
screen -A -m -d -S $name /opt/openarena/oa_ded.i386 +set fs_basepath /opt/openarena +set dedicated 2 +set com_hunkMegs 96 +exec server1.cfg $mod_parameter
The main thing which differs in ~/start-server2.sh is :
Also the name of the screen session ($name).
Now the script I use to shut down servers :
#!/bin/sh
tmpfile=`mktemp`
ps x | grep SCREEN | grep oa |grep -v "grep" |
while read pid tty stat time command
do
server_name=`echo $command | cut -d " " -f 6`
echo $server_name:$pid >> $tmpfile
done
for i in `cat $tmpfile`
do
server_name=`echo $i | cut -d ":" -f 1`
pid=`echo $i | cut -d ":" -f 2`
read -p "Close server \"$server_name\" ? (PID: $pid) ['o' or 'y' for yes] " answer
case $answer in
o|O|y|Y ) kill $pid && echo "$server_name killed" ;;
*)
esac
done
I also think I have the folders in /usr/local/games/oa (i pressed tab typing that :O )
Request that feature to firefox
(or google chrome will steal it)
Now about file location, you shouldn't have mods installed twice (even if it's a symbolic link).
My /opt/openarena is rather empty : only files of the standard game, right after unzipping.
Then I have my "oa" user home folder, ~/.openarena
Inside of it, I have mods :
oa@loverchy:~/.openarena$ ls
animal defrag index.html openforts powerball
baseoa freeze missionpack packs_defrag q3pong
And inside baseoa, I have most pk3 files, and config files :
oa@loverchy:~/.openarena/baseoa$ ls
botlib.log maprotation-ctf.cfg ps5ctf.pk3
cacatoes1.log maprotation-defrag.cfg ps9ctf.pk3
cacatoes1.log.bak maprotation-lms.cfg q3config.cfg
cacatoes2.log maprotation-noel.cfg q3config_server.cfg
cacatoes2.log.bak maprotation-pb.cfg schism-b2.pk3
cubecubecube.pk3 maprotation-qpong.cfg server1.cfg
CustomMaps maprotation-tdm.cfg server2.cfg
maprotation1.cfg maprotation-wq3.cfg server-template.cfg
maprotation2.cfg models z_am_galmevish2.pk3
maprotation-animal.cfg models_bak z_am_mckinleyish.pk3
maprotation-bfp.cfg oa_ctf4ishum1.pk3 z_q3dm6ish-ctf.pk3
maprotation-ctf2.cfg oa_koth2_b2.pk3 z_q3dm6ishv3.pk3