Page 1 of 1

Linux Start Script

Posted: Sat Dec 22, 2018 4:09 pm
by Painkiller
Hello Source Python Team and Community,

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

Re: Linux Start Script

Posted: Fri Dec 28, 2018 11:40 pm
by DeaD_EyE
What happens if you start the script with: nohup ./scriptname.sh &
Otherwise you can run it inside a screen or tmux. Tmux is better.

If I remind right, the command for screen to start a session and detach it:

screen -mdS gameserver_name ./scriptname.sh

BTW: Post next time the source: https://gist.githubusercontent.com/Bali ... install.sh

Re: Linux Start Script

Posted: Sat Dec 29, 2018 11:23 am
by Painkiller
Ok its works ty.