ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Telnet like zserv control + timestamp on zserv console

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests
View previous topic :: View next topic  
Author Message
boom_compatible
has entered the game!


Joined: 06 Sep 2020

PostPosted: Fri Nov 13, 2020 6:47 pm    Post subject: Telnet like zserv control + timestamp on zserv console Reply with quote

Zserv Feature Request

1- Timestamp on server console
sv_svtimestamp (boolean) : active/deactive server timestamp
sv_svtimestampstr (string) : custom strftime (ex: "%YYYY-%m-%d %H:%M:%S" )

2- "Remote" management
"-svctl $IP:$PORT" : listen on $IP:$PORT (TCP) for change server configuration/automation
(simple health check bot, cron scheduled script to get hourly server info...)

About request 2:
If "-svctl $IP:$PORT" is invoked, only get the options, do not listen.
ex: assume localhost by default if $IP is not set: -svctl :666
ex: listen only on internal ip: -svctl 192.168.1.3:666

Active/deactive via signal:
ex: pkill -usr1 zserv : active port listen
ex: pkill -usr2 zserv : deactive port listen

So, if the server started with "-svctl :$PORT":
ssh user@server "pkill -usr1 zserv ; echo -e 'set item_respawn_time 15\n set infighting 1\n disconnect\n' | nc 127.0.0.1 $PORT ; pkill -usr2 zserv"

Need a "disconnect" command on zserv too. The "exit" and "quit" already exists and kill the server (why both???)

I'm trying pipe/fifo/nc/socat blackmagic... no success. (If some *nix wizard already use this, please share!!!)

I only know about client side timestamp (zdoom.ini chatlog_timestamps/log_timestamps/con_timestamps) and server timestamp in logs

For while, I'm using a tmux/dtach/abduco/dvtm to put zserv in background
Back to top
View user's profile Send private message
Krawa
There is a limit


Joined: 23 Nov 2008
Location: #SDA

PostPosted: Sun Nov 22, 2020 4:10 pm    Post subject: Reply with quote

There are different ways to run ZD Linux servers.
Here a suggestion with using screen:
- Make a directory for each server and put zserv, zserv.sh and zserv.cfg from the download page there.
- In zserv.sh: don't send zserv to background (remove the & at the end of ./zserv ...).
- Create a screen (with -S <name>) for the server.
- navigate to the directory and start zserv.sh.
- Leave the screen with ctrl-a d.
- The server keeps running in background.
- Enter the screen with screen -r <name>.

So when you are connected to the server machine with ssh you can enter all screens of the servers.

If you want to put something from "outside of the screen" to the screen there is -X and "stuff" command:
screen -r <name> -X stuff $'say hello\n'
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group