- Code: Select all
#!/bin/sh
# we need a session for the -X option to work. start one if needed (with just an shell in it)
screen -S NEX -q -ls; [ $? -lt 10 ] && screen -S NEX -m -d
# now its save to start all the server in this session
screen -S NEX -X screen -t DCC ./nexuiz-server +exec server-plain.cfg +sv_public 1
screen -S NEX -X screen -t NEWBIE ./nexuiz-server +exec server-newbie.cfg +sv_public 1
screen -S NEX -X screen -t MINSTA ./nexuiz-server exec server-minsta.cfg +sv_public 1
# .... SOME MORE lines like those
In fact for (re)attaching to screens i use an other script:
- Code: Select all
#! /bin/sh
exec screen -A -x -RR -ln "$@"
When just starting this script it will create a new session, or attach to the first found session in multi-display mode so that several admins can attach to that session..
You can also use that script (i name it screenn) like this: screenn -S NEX
and be fine with the delight servers
