Posted: Fri Nov 13, 2020 6:47 pm Post subject: Telnet like zserv control + timestamp on zserv console
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
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'
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