Willkommen Gast
Du bist nicht angemeldet, um alle Funktionen des Forums zu nutzen musst du dich registrieren und anmelden. Die Registrierung ist natürlich völlig kostenlos und kann jeder Zeit wiederrufen werden.
Aktuelle Zeit: 24. Mai 2012 18:21
Das Forum zum HL Server und seinen Mods wie Counter Strike.








#!/bin/bash
game=cstrike
hostname="GEN-Nav-Files"
port=27015
rcon=rconpasswort
nice=19
echo -e "nav_generate\nservercfgfile \"s_restart.cfg\"" > ./$game/cfg/server_nav.cfg
echo -e "_restart" > ./$game/cfg/s_restart.cfg
if [ ! -f navfiles.txt ]; then echo "HLSW: sv_cheats 1 && nav_check_file_consistency ---> navfiles.txt" && exit 1; fi
cat navfiles.txt | expand | tr -s ' ' | grep "Missing nav file for" | cut -d ' ' -f 6 | sed s/.bsp// > mapcycle_nav.txt
cat navfiles.txt | expand | tr -s ' ' | grep "is built from an old version of the map" | cut -d ' ' -f 6 | sed s/.bsp// >> mapcycle_nav.txt
for map in $(cat mapcycle_nav.txt); do
nice -n $nice ./srcds_run -game "$game" -port $port -maxplayers 2 -norestart +map $map +servercfgfile server_nav.cfg +sv_password "xx" +sv_cheats 1 +rcon_password "$rcon" +hostname $hostname
done
echo -e "Fertig\nLösche erstellte Dateien: server_nav.cfg, s_restart.cfg und mapcycle_nav.txt"
rm ./$game/cfg/server_nav.cfg ./$game/cfg/s_restart.cfg ./mapcycle_nav.txt
exit 0nav_generate
servercfgfile "s_restart.cfg"_restart#!/bin/bash
pwd=`pwd`
if [ -z "$1" ]; then echo "$0 [directory from css maps]" && exit 1; fi
if [ ! "`echo $1 | tail -c 2`" = "/" ]; then path=`echo "${1}/"`; else path=$1; fi
if [ ! -d nav_files_temp ]; then mkdir nav_files_temp; else echo "removing old nav_files_temp directory" && rm -R nav_files_temp && mkdir nav_files_temp; fi
echo "copy nav files"
cp ${path}*.nav nav_files_temp/
echo "delete standard valve-navfiles from nav_files_temp directory"
rm nav_files_temp/cs_assault.nav
rm nav_files_temp/cs_compound.nav
rm nav_files_temp/cs_havana.nav
rm nav_files_temp/cs_italy.nav
rm nav_files_temp/cs_militia.nav
rm nav_files_temp/cs_office.nav
rm nav_files_temp/de_aztec.nav
rm nav_files_temp/de_cbble.nav
rm nav_files_temp/de_chateau.nav
rm nav_files_temp/de_dust2.nav
rm nav_files_temp/de_dust.nav
rm nav_files_temp/de_inferno.nav
rm nav_files_temp/de_nuke.nav
rm nav_files_temp/de_piranesi.nav
rm nav_files_temp/de_port.nav
rm nav_files_temp/de_prodigy.nav
rm nav_files_temp/de_tides.nav
rm nav_files_temp/de_train.nav
echo "make a md5sum from all bsp files"
cd $path
for bsp in $(ls *.bsp); do
md5sum $bsp > $pwd/nav_files_temp/${bsp}.md5
done
cd $pwd
echo "delete all created md5sum from standardmaps"
rm nav_files_temp/cs_assault.bsp.md5
rm nav_files_temp/cs_compound.bsp.md5
rm nav_files_temp/cs_havana.bsp.md5
rm nav_files_temp/cs_italy.bsp.md5
rm nav_files_temp/cs_militia.bsp.md5
rm nav_files_temp/cs_office.bsp.md5
rm nav_files_temp/de_aztec.bsp.md5
rm nav_files_temp/de_cbble.bsp.md5
rm nav_files_temp/de_chateau.bsp.md5
rm nav_files_temp/de_dust2.bsp.md5
rm nav_files_temp/de_dust.bsp.md5
rm nav_files_temp/de_inferno.bsp.md5
rm nav_files_temp/de_nuke.bsp.md5
rm nav_files_temp/de_piranesi.bsp.md5
rm nav_files_temp/de_port.bsp.md5
rm nav_files_temp/de_prodigy.bsp.md5
rm nav_files_temp/de_tides.bsp.md5
rm nav_files_temp/de_train.bsp.md5
echo "compress..."
cd nav_files_temp
tar -czf nav_files.tar.gz *.nav *.bsp.md5
cd $pwd
echo "move nav_files.tar.gz"
mv ./nav_files_temp/nav_files.tar.gz $pwd
echo "delete all temp files"
rm -R nav_files_temp
echo "nav_files.tar.gz is ready"
#!/bin/bash
function usage {
echo "$0 [directory from css maps]"
}
function init {
if [ -z "`which md5sum`" ]; then echo "Please install md5sum" && exit 1; fi
if [ -z "`which gzip`" ]; then echo "Please install gzip" && exit 1; fi
if [ ! -f nav_files.tar.gz ]; then echo "File nav_files.tar.gz is missing" && exit 1; fi
if [ -z "$1" ]; then usage && exit 1; fi
if [ ! -f ${1}/de_tides.bsp ]; then echo "Wrong directory in commandline" && exit 1; fi
if [ -d nav_files ]; then echo "Removing old temp directory" && rm -R nav_files; fi
pwd=`pwd`
if [ ! "`echo $1 | tail -c 2`" = "/" ]; then maps_dir=`echo "${1}/"`; else maps_dir=$1; fi
}
function check {
if [ -f ./nav_files/${1}.bsp.md5 ]; then
if [ "`cat ./nav_files/${1}.bsp.md5 | cut -d ' ' -f 1`" = "`md5sum ${2} | cut -d ' ' -f 1`" ]; then return 0; else return 1; fi
else
return 0
fi
}
function decompress {
if [ ! -d nav_files ]; then mkdir nav_files; fi
tar -xzf nav_files.tar.gz -C nav_files
}
init $1
echo "Decompressing nav_files.tar.gz"
decompress
echo "Move all NAV files to $maps_dir"
for nav_file in $(ls $maps_dir/*.bsp); do
nav_file_name=`basename $nav_file | sed 's/.bsp//'`
check $nav_file_name $nav_file && echo "Moving file ... ${nav_file_name}.nav" && mv nav_files/${nav_file_name}.nav $maps_dir
done
echo "Removing the temp directory"
rm -R nav_files
echo "Ready"
exit 0







Zurück zu Half-Life / Counterstrike
| Open Source Webinterface Forum: Gameserver Webinterface Autor: Arrow768 Antworten: 0 |
Probleme mit Download von Custom Files Forum: Counter Strike Source Autor: kcajreven Antworten: 3 |
Howto: Day of Defeat: Source Installation Forum: Day of Defeat Autor: [GSA] Bot Antworten: 0 |
Howto: Counter-Strike: Source Installation Forum: Counter Strike Source Autor: [GSA] Bot Antworten: 0 |
Call of Duty WaW - Full Linux Server Files Forum: Call of Duty Autor: poker4ace Antworten: 2 |