安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题



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