I would like to run this script as a screen.
every time i enter putty ./start28060.sh and close the console, the server goes down.
Would anyone agree to help me?
Thanks in Advance
Code: Select all
#!/bin/bash
srcds() {
cd steam
uprun="default"
synpath="steamapps/common/Synergy"
if [ $uprun = "rb" ];then synpath="steamapps/common/synbeta";fi
if [ $uprun = "b" ];then synpath="steamapps/common/synbeta";fi
if [ $uprun = "rt" ];then synpath="steamapps/common/syntwitch";fi
if [ $uprun = "t" ];then synpath="steamapps/common/syntwitch";fi
if [ ! -f ./$synpath/srcds_run ];then notinstalled;fi
if [ ! -d ./steamapps/common/Half-Life\ 2 ];then insthl2;fi
if [ ! -L ./$synpath/bin/libtier0.so ];then
mv ./$synpath/bin/libtier0.so ./$synpath/bin/libtier0.so.bak
ln -s libtier0_srv.so ./$synpath/bin/libtier0.so
fi
if [ ! -L ./$synpath/bin/libvstdlib.so ];then
mv ./$synpath/bin/libvstdlib.so ./$synpath/bin/libvstdlib.so.bak
ln -s libvstdlib_srv.so ./$synpath/bin/libvstdlib.so
fi
reds
}
reds() {
./$synpath/srcds_run -game synergy -console +maxplayers 32 +sv_lan 0 +map d1_trainstation_06 +exec server2.cfg -ip 178.63.18.62 -port 28060 -nocrashdialog -insecure -nohltv
sleep 1
reds
}
srcds