We gonna split with one script to broadcast (connect to the game server, record the demo, create delay and create the Hub), and an other one to manage a slave that connect on the ETTV Hub Server.
broadcast.sh
#!/bin/sh
# information about the game server
MATCH_HOST="match.pourix.net"
MATCH_PASS="password"
MATCH_ETTV_PASS="ettv_password"
ETTV_NAME="^xIX^dmarlene^7"
ETTV_MOTD="^dPour^xIX^7, broadcasting"
BROADCASTER_HOST="213.251.145.136" #host of the broadcaster
BROADCASTER_ADMIN="passadmin"
SHOUTCASTER_PORT="49999" # port of the first server (recorder)
BROADCASTER_PORT="50000" # port of the hub server (player)
BROADCASTER_SLAVES=4 # number of slots on the Hub
BROADCASTER_PASS="pass1" # password1 to access the hub
BROADCASTER_ETTV_PASS="pass2" #password2 to access the hub
SHOUTCAST_DELAY=60 # delay
# no need to change anything behind this line.
rm ~/.etwolf/etpro/demos/demo*
./ettv.x86 +set fs_game etpro \
+set net_ip $BROADCASTER_HOST +set net_port $SHOUTCASTER_PORT +set com_hunkMegs 48 +set ettv_autorecord 1 \
+set sv_maxclients 4 +set ettv_clientname $ETTV_NAME +set sv_hostname $ETTV_MOTD +map oasis \
+set g_password $BROADCASTER_ADMIN +set rconpassword $BROADCASTER_ADMIN \
+set sv_maxRate 25000 +set sv_allowDownload 1 +set sv_wwwDownload 1 \
+set sv_wwwBaseURL $ET_DL_URL +set sv_wwwDlDisconnected 0 \
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS &
sleep $SHOUTCAST_DELAY
./ettv.x86 +set fs_game etpro \
+set net_ip $BROADCASTER_HOST +set net_port $BROADCASTER_PORT +set com_hunkMegs 128 \
+set sv_maxclients $((BROADCASTER_SLAVES+4)) +set ettv_clientname $ETTV_NAME +set sv_hostname $ETTV_MOTD \
+set g_password $BROADCASTER_PASS +set rconpassword $BROADCASTER_ADMIN \
+set sv_maxRate 25000 +set sv_allowDownload 1 +set sv_wwwDownload 1 \
+set sv_wwwBaseURL $ET_DL_URL +set sv_wwwDlDisconnected 0 \
+set sv_wwwFallbackURL $ET_DL_URL \
+set ettv_autoplay 1 +demo demo0000 \
+set ettv_password $BROADCASTER_ETTV_PASS \
+set b_ettv_flags 3 \
+set ettv_sv_maxslaves $BROADCASTER_SLAVES
And for slaves, just have one script by slave server:
slave.sh
#!/bin/sh
BROADCAST_HOST="213.251.145.136:50000" # IP of the hub
BROADCAST_PASS="pass1" #pass1
BROADCAST_ETTV_PASS="pass2" #pass2
SLAVE_HOST="213.251.145.136" # infos on the slave
SLAVE_PORT="27960"
SLAVE_RCON="rcon_pass"
SLAVE_USERS="110"
SLAVE_MOTD="^dPour^xIX^7, broadcasting"
SLAVE_NAME="^xIX^7, tv1"
ET_DL_URL="http://et.pr0npaganda.net/"
./ettv.x86 +set fs_game etpro \
+set net_ip $SLAVE_HOST +set net_port $SLAVE_PORT +set com_hunkMegs "512" \
+set sv_maxclients $SLAVE_USERS +set ettv_clientname $SLAVE_NAME \
+set rconpassword $SLAVE_RCON +set sv_hostname $SLAVE_MOTD \
+set sv_maxRate 25000 +set sv_allowDownload 1 +set sv_wwwDownload 1 \
+set sv_wwwBaseURL $ET_DL_URL +set sv_wwwDlDisconnected 0 \
+set sv_wwwFallbackURL $ET_DL_URL \
+tv connect $BROADCAST_HOST $BROADCAST_ETTV_PASS $BROADCAST_PASS
Chaining is f*cking cool, because of the limit/tension we always reach on big match (like next one on thurday ;p). But we'll try not to polemic on this forum. :]
daita.