Jump to content

Recommended Posts

I was looking to setup a cron job to check user count and if 0 then check for update and restart.  There is a program called gamedig that I use to get this information from my kf2 server but DST is not supported from what I can tell.

Link to comment
Share on other sites

You could go for something like

c_listallplayers()

from the server console, grep the result and if it's empty/no player listed your software can restart the server. Then you can shut all shards down from the same console you have accessed.

c_shutdown()

Biggest problem is to get access to the server console here. How are you running your server disconnected from the shell? Screen, docker, nohup or the solution from the quick setup guide?

Link to comment
Share on other sites

5 hours ago, Daniel86268 said:

Biggest problem is to get access to the server console here. How are you running your server disconnected from the shell? Screen, docker, nohup or the solution from the quick setup guide?

I am using tmux

Link to comment
Share on other sites

I used the commands

tmux send-keys -t dstserver 'c_listallplayers()' Enter

but that only shows the players on the main server and not the caves server? It also does not return a simple number that I can capture.   Does anyone know of any easier way to get a simple player count so I can update the server when the player count = 0 as oppose to a scheduled restart on a certain day and time.  Thank You :) .

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...