Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Link to the Windows HLSW Download: https://download.cnet.com/HLSW/3000-2121_4-10965163.html
One or more of these changes may be surplus to requirement.
Add the -condebug command to the ./hlds_run command
Add the following values in the server.cfg file
log on
log_detail 3
sv_logfile 1
sv_logecho 1
cd to the cstrike folder and run the following command
tail -f qconsole.log
logaddress_add <ip>:<port>
The server log will be sent in realtime and plaintext to the target ip over udp on the port specified.
Then you will need something to receive and decode / clean the data and either show it or write it to a file
tail -f -n0 .steam/steamcmd/cs/cstrike/qconsole.log | grep -w '.*STEAM.*entered the game\|.*STEAM.*disconnected'
NOTE: The .steam/steamcmd/cs/cstrike folder path is specific to my install
I created a script by:
entering the command: CD ~
entering the command: touch csmon.sh
entering the command: nano csmon.sh
adding this text on line one: #!bash/bin
adding the "revised command" above to line two and using CTRL+O and enter to save the file
using the command CTRL+X to close the file
using the following command to make the script executable: chmod +x csmon.sh
So that now when I log in (via SSH) all I need to type is ./csmon.sh to start monitoring the console and have the read out limited to users connecting and disconnecting. The reason I included the .*STEAM string is because I have BOT's running on the server so this argument means BOT's connecting and disconnecting wont be read out as they don't have steam ID's read out in the console.
I hope this helps someone, as I couldnt find all this info in one place when attempting to get it all configured.
that way you can atach/detach the screen that is running the server, seeing the console..
Just dont forget to detach before loging out.
https://linuxize.com/post/how-to-use-linux-screen/
post the script , change the DIR to where hlds_run is and the Name (here 2015 appears in Jobs) and the Game parameters to ur liking
I have multible scrips in my home from where i start the servers (the ecos are in German:) )
just put ./startscript start (or stop or restart) and the server runs as screen in the backround
here the script :
#! /bin/sh
#scriptquelle : http://no-Tex.com
NAME=27015
DESC="27015"
PARAMS="-game cstrike +map de_dust2 -maxplayers 32 -port 27015 +ip 62.75.142.93 -tickrate 100 -pingboost 2 -sport -autoupdate"
DIR=/home/csserver/serverfiles
SCRIPT=hlds_run
DAEMON=$DIR/$SCRIPT
case "$1" in
start)
echo "Starte $DESC: $NAME"
cd $DIR
screen -d -m -S $NAME $DAEMON $PARAMS
;;
stop)
if [[ `screen -ls |grep $NAME` ]]
then
echo -n "Stoppe $DESC: $NAME"
kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
echo " ... Server gestoppt."
else
echo "Konnte keinen laufenden Server mit PID -- $DESC -- nicht finden"
fi
;;
restart)
if [[ `screen -ls |grep $NAME` ]]
then
echo -n "Stoppe $DESC: $NAME"
kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
echo " ... Server gestoppt ... Kommando Start wird ausgeführt"
else
echo "Konnte keinen laufenden Server mit PID -- $DESC -- nicht finden ... Kommando Start wird ausgeführt"
fi
echo -n "Starte $DESC: $NAME"
cd $DIR
screen -d -m -S $NAME $DAEMON $PARAMS
echo " ... Server gestartet."
;;
*)
echo "Usage: $0 Parameter eingeben {start|stop|restart}"
exit 1
;;
esac
exit 0