Dit script download, installeet en configureert (voor zover het nodig is) een CS 1.5 LAN (NOWON) server.
Wat doet het script:
- Het download de benodigde bestanden en extract ze
- Het maakt nieuwe bestanden aan & het compiled ze (compileren)
- Het maakt een startscript om de server makkelijk te kunnen starten (door ./start.sh uit te voeren)
- Het update het bestand: hlds_run (vervangen, het wordt van mijn host gedownload)
- Het verwijderd de bekende bug zodat iedereen je server kan uitschakelen
Als je de server wil starten met het commando: startcsserver doe je dit:
ln -s /PATH_TO_hlds_l/start.sh /usr/sbin/startcsserver
#!/bin/sh
wget http://3dgamers.iinet.net.au/pub/3dgamers/games/halflife/hlds_l_3111_full.bin
wget ftp://ftp.sandy.ru/pub/games/gamesfiles/HalfLife/Linux/hlds_l_3111e_update.tar.gz
chmod +x hlds_l_3111_full.bin
./hlds_l_3111_full.bin
tar xzvf hlds_l_3111_full.tar.gz > /dev/null
tar xzvf hlds_l_3111e_update.tar.gz > /dev/null
cd hlds_l
wget ftp://ftp.leivo.ru/pub/warez/cs_15_full.tar.gz
tar xzvf cs_15_full.tar.gz > /dev/null
cd valve
rm valvecomm.lst
wget http://www.no-won.net/valvecomm.lst
cd ..
touch nowon.c
echo "int NET_IsReservedAdr(){return 1;}" > nowon.c
gcc -c nowon.c -o nowon.o
ld -shared -o nowon.so nowon.o
rm start.sh
touch start.sh
echo "#!/bin/sh" > start.sh
echo "" >> start.sh
echo "./hlds_run -game cstrike +map de_dust +maxplayers 16 +port 27015 +sv_lan 1 +rcon_password gdxownt > /dev/null" >> start.sh
echo "" >> start.sh
chmod +x start.sh
wget http://svn.nomi.cz/svn/tomi/dedtools/head/hlds/hlds_20040707fix.c
gcc -s -O3 -D_GNU_SOURCE -fPIC -shared -ldl -o hlds_20040707fix.so hlds_20040707fix.c
cp hlds_run hlds_run.bak
wget http://wim.robohost.be/steamlessproject/hlds_run
chmod +x hlds_run
if [ -f hlds_run ]
then
echo "Ok, your hlds_run file is up2date!"
echo ""
echo "Please modify your hlds_run file:"
echo "edit the hlds_l path to your ROOT path!"
echo "You will see (on one of the first lines in the script): hlds_dir=/home/cstrike/hlds_l"
echo "PLEASE edit /home/cstrike/hlds_l to YOUR ROOT path!"
echo "IT WILL NOT WORK IF YOU DON'T DO THIS!!"
else
cp hlds_run.bak hlds_run
echo ""
echo "PLEASE UPDATE YOUR hlds_run FILE!!!"
echo ""
echo "Howto:"
echo ""
echo "Add UNDER the first export this:"
echo "export LD_PRELOAD=/HLDS_L-dir/nowon.so /HLDS_L-dir/hlds_20040707fix.so"
echo ""
echo "ATTENTION: Be sure you've renamed /HLDS_L-dir/ to your ROOT path! (like: /home/cstrike/hlds_l/nowon.so"
echo ""
fi
echo ""
echo ""
echo "Yeah, your server should be installed!"
echo ""
echo "Just typ ./start.sh in this directory to start your server ;-)"