<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wolfwiki.anime.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deej</id>
	<title>WolfWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wolfwiki.anime.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deej"/>
	<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php/Special:Contributions/Deej"/>
	<updated>2026-11-08T12:53:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=2469</id>
		<title>ETTV:Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=2469"/>
		<updated>2006-07-30T11:42:49Z</updated>

		<summary type="html">&lt;p&gt;Deej: added ettv_netblast 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;dot_graph&amp;gt;&lt;br /&gt;
digraph ettv {&lt;br /&gt;
master -&amp;gt; slave1&lt;br /&gt;
master -&amp;gt; slave2&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;client1..&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;..client50&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;client51..&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;..client100&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;chained_slave1&amp;quot;&lt;br /&gt;
chained_slave1 -&amp;gt; &amp;quot;client101&amp;quot;&lt;br /&gt;
chained_slave1 -&amp;gt; &amp;quot;...client150&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dot_graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Master&amp;quot; (gameserver)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.(x86|exe) to the same directory your etded.(x86|exe) is located.&lt;br /&gt;
Start your gameserver as normal, but run ettv.(x86|exe) instead of etded.(x86|exe).&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039; (default 0, no slave connections allowed)&lt;br /&gt;
:Number of ettv slaves allowed to connect.&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; Slave slots are always reserved, like private slots.&lt;br /&gt;
&#039;&#039;&#039;ettv_password&#039;&#039;&#039; (default &amp;quot;&amp;quot;, no slave connections allowed) &lt;br /&gt;
:Password for ettv slaves.&lt;br /&gt;
:Must be set, or no slaves will be able to connect!&lt;br /&gt;
&#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039; (default 3)&lt;br /&gt;
:1 = prevent slaves from being callvote kicked&lt;br /&gt;
:2 = grant shoutcaster status to slaves&lt;br /&gt;
:values can be added together, eg 3 for both features.&lt;br /&gt;
&lt;br /&gt;
===Playing on the master===&lt;br /&gt;
Players may now connect to your gameserver as normal.&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Slave&amp;quot; (broadcast server)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.(x86|exe) to the same directory your etded.(x86|exe) is located.&lt;br /&gt;
Copy tvgame.mp.i386.(so|dll) to the same directory as your etpro/qagame.mp.i386.(so|dll) is located.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&#039;&#039;&#039;sv_maxclients&#039;&#039;&#039;&lt;br /&gt;
:Number of spectator clients to allow. This number is only limited by available cpu and memory.&lt;br /&gt;
:Some guidelines when provisioning a broadcast server:&lt;br /&gt;
:*100 spectator slots will require ~ 128mb ram. Use com_hunkmegs to set this.&lt;br /&gt;
:*100 spectator slots will require ~ 768kbyte/sec (6mbits), roughly 6kbyte/sec per client&lt;br /&gt;
:*100 spectator slots will take ~ 80% cpu of a Xeon 2.2ghz&lt;br /&gt;
:*Each slave will require ~20-40kbyte/sec from the master.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_clientname&#039;&#039;&#039; (default &amp;quot;ETTV&amp;quot;)&lt;br /&gt;
:Playername the slave will use when connecting to the master, eg &amp;quot;ETTV-xyz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_delay&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of seconds for slave to delay the master feed. Recording/playback chains should no longer be needed, and slaves should always maintain an exact delay from the master server. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: this should ONLY be set on the slave.&lt;br /&gt;
:&#039;&#039;note&#039;&#039;: only supported in ettv beta8 and later&lt;br /&gt;
&lt;br /&gt;
===Chat passwords===&lt;br /&gt;
In order to curb the rampant abuse of ettv chat, admins may set &amp;quot;chat passwords&amp;quot; on their servers. If enabled, viewers are not allowed to chat unless they have a password. You can define as many passwords as you like, so you can easily track down individual abusers and limit the damage of stolen passwords.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpasswords&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of chat passwords defined.&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpassword&#039;&#039;&#039;(1-99999)&lt;br /&gt;
:individual chat passwords.&lt;br /&gt;
&lt;br /&gt;
viewers use &amp;lt;tt&amp;gt;/chatpassword &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;password&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; to login.&lt;br /&gt;
&lt;br /&gt;
if logged in, ettv chats will be tagged with a number in parentheses identifying which chat password the viewer is using. &lt;br /&gt;
===Misc commands for viewers===&lt;br /&gt;
;For ettv beta 4 and above&lt;br /&gt;
* spectators may &amp;lt;tt&amp;gt;/ignore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/unignore&amp;lt;/tt&amp;gt; other spectators&lt;br /&gt;
* &amp;lt;i&amp;gt;semiadmin&amp;lt;/i&amp;gt; functionality now works for slaves&lt;br /&gt;
* rcon may now mute/unmute specs &lt;br /&gt;
&lt;br /&gt;
===Connect the slave===&lt;br /&gt;
Now start your slave server by running ettv.(x86|exe)&lt;br /&gt;
&lt;br /&gt;
Tell the slave server to connect up to the master server:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv connect master.ip.address:port &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;ettv_password&amp;lt;/b&amp;gt;(required)&amp;lt;/i&amp;gt; &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;g_password&amp;lt;/b&amp;gt;(if the master has a g_password set)&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have configured everything correctly, the slave should connect to the master.&lt;br /&gt;
Clients should now be able to connect to the slave and spectate the game in progress.&lt;br /&gt;
&lt;br /&gt;
This is a &amp;quot;live broadcast&amp;quot; with no delay.&lt;br /&gt;
&lt;br /&gt;
===Disconnect the slave===&lt;br /&gt;
To tell the slave to disconnect from the master:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv disconnect&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Slave Chaining===&lt;br /&gt;
&lt;br /&gt;
==== What is chaining and why chain slaves? ====&lt;br /&gt;
&lt;br /&gt;
ETTV allows chaining slaves together. This very neat feature lets you connect one ETTV slave to another ETTV slave that is broadcasting a match instead of directly to the game server hosting the match. Apart from the &amp;quot;w00t this is very cool&amp;quot; factor, why is this feature so important for admins? Basicly, working in a chained model allows to broadcast a match to a large number of spectators without too much hastle and too many risks for the master server.&lt;br /&gt;
&lt;br /&gt;
Chaining was developped for a simple reason: if you take into account that one ETTV slave connects at an &#039;&#039;&#039;unlimited&#039;&#039;&#039; rate to a master, you really don&#039;t want to connect 15 or 20 slaves to a game server to broadcast let&#039;s say the &#039;&#039;Atlantic Battle&#039;&#039;. Chances are you will bring down the master game server and thus the game. Chaining slaves firmly alleviates the load on the master game server. 2 or 4 of these &#039;&#039;Hubs&#039;&#039; can do the job of delaying the signal and feeding it to other slaves.&lt;br /&gt;
&lt;br /&gt;
Other benefits might include better network performance. If you can choose to either connect your slave to the game server where your connection is not optimal or to a nearby slave who is on a better connection to the master, it might help the quality of your broadcast. Plus you don&#039;t need to record anything when connecting to a delayed slave.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your slave to allow connections from other slaves ====&lt;br /&gt;
&lt;br /&gt;
This part is actually pretty easy. You need to set up your slave as if you were setting up a master game server. This means that, next to the normal slave parameters, you have to set up the following:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039;: set this to at least 1&lt;br /&gt;
* &#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039;: set this to at least 1. Depending on how powerful your machine is you can set this number higher. Don&#039;t set it too high though, a slave still connects at an unlimited rate&lt;br /&gt;
* &#039;&#039;&#039;ettv_password&#039;&#039;&#039;: set to something else than &amp;quot;&amp;quot;. This password is needed by the slaves connecting to your slave (together with g_password of course)&lt;br /&gt;
&lt;br /&gt;
Other settings such as ettv_netblast, ettv_tv_iptos etc... can be set as well. You can even use autorecord if you wish, or just add an extra delay.&lt;br /&gt;
&lt;br /&gt;
==== Pitfalls ====&lt;br /&gt;
&lt;br /&gt;
There are however a few risks associated with slave chaining. One of the biggest issues is &#039;&#039;&#039;PK3 dependancies&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As you know, a slave needs to have at least all the PK3s of the server it connects too. But a slave can have more PK3s installed, as long as it has the ones on the server&#039;s pure list. This is what complicates things! The further you go down the &amp;quot;chain&amp;quot;, the more the chances exist of PK3 pollution, which makes the job of the last slave very hard. And the viewers connecting to that slave will not be very happy either.&lt;br /&gt;
&lt;br /&gt;
So for those of you venturing into chaining slaves here&#039;s a rule of thumb: &#039;&#039;&#039;always keep the installed PK3s to the bare minimum&#039;&#039;&#039;! Do not add stuff you do not need. If you want to know what PK3s you need and not need, connect your slave to the master or the hub, see which PK3s are on the pure list and rename or remove the PK3s that are not on the list. You will make your viewers and other admins connecting to your slave very happy.&lt;br /&gt;
&lt;br /&gt;
Another risk could be &#039;&#039;&#039;chained lag&#039;&#039;&#039;. If one of the slaves that is higher in the chain starts lagging, the consequenses for the slaves depending on it will be seen immedeatily. So if you offer to be one of the higher slaves in the chain, make sure your machine can handle it! An ETTV chain is much like the food chain ;-).&lt;br /&gt;
&lt;br /&gt;
==== Admin contributions ====&lt;br /&gt;
&lt;br /&gt;
If by now you feel like getting your hands dirty in ETTV chaining madness and you want to see some example of hubs, slaves, broadcasters and scripts to get it all working, you can already start by checking out [[User:Deej|deej&#039;s page]].&lt;br /&gt;
&lt;br /&gt;
==ETTV Demos==&lt;br /&gt;
ETTV can record and playback &#039;&#039;&#039;ETTV demos&#039;&#039;&#039;. ETTV demos have the extension .tv_84 (or .tv_83 for older versions) and are completely different from the .dm_84 demos recorded on clients. &lt;br /&gt;
&lt;br /&gt;
You may record the match in progress to a file, with the command:&lt;br /&gt;
:&amp;lt;tt&amp;gt;record &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
If you omit the demo name, ettv will start recording using a filename of demoXXXX where XXXX is the first available number starting from 0000.&lt;br /&gt;
&lt;br /&gt;
Demos will stop recording when a map changes.&lt;br /&gt;
&lt;br /&gt;
To stop recording a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;stoprecord&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To play back a recorded demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of an ettv slave:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv status&amp;lt;/tt&amp;gt;&lt;br /&gt;
This will tell you if the slave is connected to a master, or if it is currently playing back a demo.&lt;br /&gt;
&lt;br /&gt;
To fastforward a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;ff &amp;lt;i&amp;gt;&amp;lt;seconds&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
Eg &amp;lt;tt&amp;gt;ff 30&amp;lt;/tt&amp;gt; will fast foward 30 seconds. Fast forward stops at map restarts, so you can safely ff 999 to fast forward through a warmup. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: requires ettv beta 7 or later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Autorecording demos===&lt;br /&gt;
ettv is able to automatically continuously record demos, creating new demofiles when the map changes. To do this, set the cvar ettv_autorecord to 1. ettv will start recording demos with the name demoXXXX where XXXX is a number starting at 0000 and incrementing on each map change.&lt;br /&gt;
&lt;br /&gt;
Server admins may find it useful to use the demo recording feature of ettv to record matches, instead of requiring individual players to record them. An ettv demo records everything that happens on a server, including all player viewpoints.&lt;br /&gt;
&lt;br /&gt;
===How to create demo based delayed feeds===&lt;br /&gt;
Autorecording demos is the first half of the process for delayed feeds. Typically you would run a passworded slave server with the smallest number of sv_maxclients possible. No spectators should connect to this server. The only purpose of this slave is to connect up to the master and record the match to sequentially numbered demofiles.&lt;br /&gt;
&lt;br /&gt;
Now start up a slave, and tell it to broadcast the demo being recorded.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo demo0000&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wait approx. 60 seconds after the master begins recording before issuing this command to your slaves, then you have a 60 second delay on your broadcast.&lt;br /&gt;
&lt;br /&gt;
If you want slaves to automatically switch to the next demo when the end of the demo is reached (eg on a map change), you would set the cvar ettv_autoplay to 1. If a slave is playing demo0000 and it reaches the end, it will then try to play demo0001 and so on.&lt;br /&gt;
&lt;br /&gt;
Disadvantage of this method: It is not automated in ettv itself, though admins can script it.&lt;br /&gt;
Advantage of this method: You may run multiple broadcast servers from the same single demo stream.&lt;br /&gt;
&lt;br /&gt;
Automated delayed feeds are supported in ettv beta 8. See the above.&lt;br /&gt;
&lt;br /&gt;
===Playing back previously recorded ETTV demos===&lt;br /&gt;
This is essentially the same as delayed feeds above.&lt;br /&gt;
* Configure your server as described in [[ETTV:Server_Configuration#Installation_-_.22Slave.22_.28broadcast_server.29|Slave Installation]] section&lt;br /&gt;
* Obtain the &amp;lt;tt&amp;gt;.tv_*&amp;lt;/tt&amp;gt; demos and place them in &amp;lt;tt&amp;gt;&#039;&#039;fs_game&#039;&#039;/demos&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Start the ettv executable with pb disabled&lt;br /&gt;
* &amp;lt;tt&amp;gt;set ettv_autoplay 1&amp;lt;/tt&amp;gt; if you want to play back sequential demos named &amp;lt;tt&amp;gt;demo0000.tv_84&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;demo0001.tv_84&amp;lt;/tt&amp;gt; etc.&lt;br /&gt;
* &amp;lt;tt&amp;gt;demo &#039;&#039;&#039;&amp;lt;yourdemoname&amp;gt;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* connect a client and enjoy the show!&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* The slave server must be running the same fs_game setting as the master server.&lt;br /&gt;
* The slave server must have a copy of every map pk3 the master server is using.&lt;br /&gt;
* If the master server loads a map the slave server doesn&#039;t have, the slave will get stuck.&lt;br /&gt;
* Spectators will be forced to download any custom pk3 you are using.&lt;br /&gt;
* It is a good idea to keep the master server pk3 list to a minimum.&lt;br /&gt;
* If you are using the autorecord/autoplay feature for running delayed feeds, you will usually want to make sure you clear out the demos directory first. Autorecording will start numbering demofiles using the first available number, so if you have old recorded demos then ettv might start recording from eg demo0017. If your scripts expect to start playback from demo0000 then you might end up broadcasting a game recorded at some earlier date...&lt;br /&gt;
* If the broadcaster constantly reloads on round starts etc, it&#039;s probably a problem with too many pk3s on the ettv servers.&lt;br /&gt;
&lt;br /&gt;
==Miscellaneous==&lt;br /&gt;
* Slaves may send chats to the master with the command msay&lt;br /&gt;
* Slaves may list players on the master with the command players&lt;br /&gt;
&lt;br /&gt;
==Performance tuning==&lt;br /&gt;
&lt;br /&gt;
Spectator servers with large numbers of clients (eg &amp;gt;100) will push the OS very hard with huge amounts of UDP traffic. The default OS buffer settings for Linux are inadequate and can hurt performance, causing lag and/or disconnects.&lt;br /&gt;
&lt;br /&gt;
If you get messages like&lt;br /&gt;
:&amp;lt;tt&amp;gt;NET_SendPacket ERROR: No buffer space available to 192.168.120.142:27960&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you definitely need to increase your kernel network buffers.&lt;br /&gt;
&lt;br /&gt;
Large spectator servers should increase the kernel buffers.&lt;br /&gt;
&lt;br /&gt;
The following commands should be issued as root on linux:&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values will be lost on a reboot of your system. A good way to reapply the values upon boot is to include the following in your /etc/sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.rmem_default = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.rmem_max = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.wmem_default = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.wmem_max = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FreeBSD can try this:&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.recvspace=65535&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.maxdgram=57344&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w kern.ipc.maxsockbuf=8388608&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Network tuning cvars===&lt;br /&gt;
;The following are only available in ettv beta 7 and later.&lt;br /&gt;
By default, et uses small packets of 1400 bytes or less to send to clients. If messages need to be larger, they are &#039;fragmented&#039; and sent over several server frames. ettv slave messages tend to be large and often fragment. ettv normally tries to send slaves all fragments at once to avoid jittery playback, but some networks / OSes handle this badly. ettv beta 7 introduces new controls so admins can optimize ettv for their individual network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_netblast&#039;&#039;&#039; (default 1)&lt;br /&gt;
:by default, ettv tries to send all fragments at once. some networks may handle this badly. Possible values are:&lt;br /&gt;
:* 0 - disable sending all fragments at once. Warning: setting this to 0 without increasing ettv_mtu will result in severely laggy slave playback.&lt;br /&gt;
:* 1 - send all fragments at once (default behaviour)&lt;br /&gt;
:* 2 - use the old (very broken) beta4 netblast behavior (only applicable for ETTV beta 11 &amp;amp; higher)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_mtu&#039;&#039;&#039; (default 1400)&lt;br /&gt;
:; master only&lt;br /&gt;
:if your network / os supports it, you can set this to large values (eg 16000) to prevent message fragmentation and provide smoother ettv links. this cvar has no effect on normal ET clients. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: ettv_mtu must currently be set from commandline, it cannot be changed on the fly (yet).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_tv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:you can set the ip type of service field of ettv link packets. if your network/ISP supports it, you can use a value like 16 (&amp;quot;minimize delay&amp;quot;) to prioritize ettv link packets over others on the network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:same as ettv_tv_iptos, but affects packets for normal ET clients.&lt;br /&gt;
&lt;br /&gt;
===Article Reference===&lt;br /&gt;
(x86|exe) refers to the file extension of the ettv file, for linux use .x86 and for windows use .exe&lt;br /&gt;
(so|dll) refers to the file extension of the slave file, for linux use .so and for windows use .dll&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=2389</id>
		<title>ETTV:Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=2389"/>
		<updated>2006-07-17T14:03:28Z</updated>

		<summary type="html">&lt;p&gt;Deej: Fusen missed a spot :-)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;dot_graph&amp;gt;&lt;br /&gt;
digraph ettv {&lt;br /&gt;
master -&amp;gt; slave1&lt;br /&gt;
master -&amp;gt; slave2&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;client1..&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;..client50&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;client51..&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;..client100&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;chained_slave1&amp;quot;&lt;br /&gt;
chained_slave1 -&amp;gt; &amp;quot;client101&amp;quot;&lt;br /&gt;
chained_slave1 -&amp;gt; &amp;quot;...client150&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dot_graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Master&amp;quot; (gameserver)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.(x86|exe) to the same directory your etded.(x86|exe) is located.&lt;br /&gt;
Start your gameserver as normal, but run ettv.(x86|exe) instead of etded.(x86|exe).&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039; (default 0, no slave connections allowed)&lt;br /&gt;
:Number of ettv slaves allowed to connect.&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; Slave slots are always reserved, like private slots.&lt;br /&gt;
&#039;&#039;&#039;ettv_password&#039;&#039;&#039; (default &amp;quot;&amp;quot;, no slave connections allowed) &lt;br /&gt;
:Password for ettv slaves.&lt;br /&gt;
:Must be set, or no slaves will be able to connect!&lt;br /&gt;
&#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039; (default 3)&lt;br /&gt;
:1 = prevent slaves from being callvote kicked&lt;br /&gt;
:2 = grant shoutcaster status to slaves&lt;br /&gt;
:values can be added together, eg 3 for both features.&lt;br /&gt;
&lt;br /&gt;
===Playing on the master===&lt;br /&gt;
Players may now connect to your gameserver as normal.&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Slave&amp;quot; (broadcast server)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.(x86|exe) to the same directory your etded.(x86|exe) is located.&lt;br /&gt;
Copy tvgame.mp.i386.(so|dll) to the same directory as your etpro/qagame.mp.i386.(so|dll) is located.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&#039;&#039;&#039;sv_maxclients&#039;&#039;&#039;&lt;br /&gt;
:Number of spectator clients to allow. This number is only limited by available cpu and memory.&lt;br /&gt;
:Some guidelines when provisioning a broadcast server:&lt;br /&gt;
:*100 spectator slots will require ~ 128mb ram. Use com_hunkmegs to set this.&lt;br /&gt;
:*100 spectator slots will require ~ 768kbyte/sec (6mbits), roughly 6kbyte/sec per client&lt;br /&gt;
:*100 spectator slots will take ~ 80% cpu of a Xeon 2.2ghz&lt;br /&gt;
:*Each slave will require ~20-40kbyte/sec from the master.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_clientname&#039;&#039;&#039; (default &amp;quot;ETTV&amp;quot;)&lt;br /&gt;
:Playername the slave will use when connecting to the master, eg &amp;quot;ETTV-xyz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_delay&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of seconds for slave to delay the master feed. Recording/playback chains should no longer be needed, and slaves should always maintain an exact delay from the master server. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: this should ONLY be set on the slave.&lt;br /&gt;
:&#039;&#039;note&#039;&#039;: only supported in ettv beta8 and later&lt;br /&gt;
&lt;br /&gt;
===Chat passwords===&lt;br /&gt;
In order to curb the rampant abuse of ettv chat, admins may set &amp;quot;chat passwords&amp;quot; on their servers. If enabled, viewers are not allowed to chat unless they have a password. You can define as many passwords as you like, so you can easily track down individual abusers and limit the damage of stolen passwords.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpasswords&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of chat passwords defined.&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpassword&#039;&#039;&#039;(1-99999)&lt;br /&gt;
:individual chat passwords.&lt;br /&gt;
&lt;br /&gt;
viewers use &amp;lt;tt&amp;gt;/chatpassword &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;password&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; to login.&lt;br /&gt;
&lt;br /&gt;
if logged in, ettv chats will be tagged with a number in parentheses identifying which chat password the viewer is using. &lt;br /&gt;
===Misc commands for viewers===&lt;br /&gt;
;For ettv beta 4 and above&lt;br /&gt;
* spectators may &amp;lt;tt&amp;gt;/ignore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/unignore&amp;lt;/tt&amp;gt; other spectators&lt;br /&gt;
* &amp;lt;i&amp;gt;semiadmin&amp;lt;/i&amp;gt; functionality now works for slaves&lt;br /&gt;
* rcon may now mute/unmute specs &lt;br /&gt;
&lt;br /&gt;
===Connect the slave===&lt;br /&gt;
Now start your slave server by running ettv.(x86|exe)&lt;br /&gt;
&lt;br /&gt;
Tell the slave server to connect up to the master server:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv connect master.ip.address:port &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;ettv_password&amp;lt;/b&amp;gt;(required)&amp;lt;/i&amp;gt; &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;g_password&amp;lt;/b&amp;gt;(if the master has a g_password set)&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have configured everything correctly, the slave should connect to the master.&lt;br /&gt;
Clients should now be able to connect to the slave and spectate the game in progress.&lt;br /&gt;
&lt;br /&gt;
This is a &amp;quot;live broadcast&amp;quot; with no delay.&lt;br /&gt;
&lt;br /&gt;
===Disconnect the slave===&lt;br /&gt;
To tell the slave to disconnect from the master:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv disconnect&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Slave Chaining===&lt;br /&gt;
&lt;br /&gt;
==== What is chaining and why chain slaves? ====&lt;br /&gt;
&lt;br /&gt;
ETTV allows chaining slaves together. This very neat feature lets you connect one ETTV slave to another ETTV slave that is broadcasting a match instead of directly to the game server hosting the match. Apart from the &amp;quot;w00t this is very cool&amp;quot; factor, why is this feature so important for admins? Basicly, working in a chained model allows to broadcast a match to a large number of spectators without too much hastle and too many risks for the master server.&lt;br /&gt;
&lt;br /&gt;
Chaining was developped for a simple reason: if you take into account that one ETTV slave connects at an &#039;&#039;&#039;unlimited&#039;&#039;&#039; rate to a master, you really don&#039;t want to connect 15 or 20 slaves to a game server to broadcast let&#039;s say the &#039;&#039;Atlantic Battle&#039;&#039;. Chances are you will bring down the master game server and thus the game. Chaining slaves firmly alleviates the load on the master game server. 2 or 4 of these &#039;&#039;Hubs&#039;&#039; can do the job of delaying the signal and feeding it to other slaves.&lt;br /&gt;
&lt;br /&gt;
Other benefits might include better network performance. If you can choose to either connect your slave to the game server where your connection is not optimal or to a nearby slave who is on a better connection to the master, it might help the quality of your broadcast. Plus you don&#039;t need to record anything when connecting to a delayed slave.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your slave to allow connections from other slaves ====&lt;br /&gt;
&lt;br /&gt;
This part is actually pretty easy. You need to set up your slave as if you were setting up a master game server. This means that, next to the normal slave parameters, you have to set up the following:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039;: set this to at least 1&lt;br /&gt;
* &#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039;: set this to at least 1. Depending on how powerful your machine is you can set this number higher. Don&#039;t set it too high though, a slave still connects at an unlimited rate&lt;br /&gt;
* &#039;&#039;&#039;ettv_password&#039;&#039;&#039;: set to something else than &amp;quot;&amp;quot;. This password is needed by the slaves connecting to your slave (together with g_password of course)&lt;br /&gt;
&lt;br /&gt;
Other settings such as ettv_netblast, ettv_tv_iptos etc... can be set as well. You can even use autorecord if you wish, or just add an extra delay.&lt;br /&gt;
&lt;br /&gt;
==== Pitfalls ====&lt;br /&gt;
&lt;br /&gt;
There are however a few risks associated with slave chaining. One of the biggest issues is &#039;&#039;&#039;PK3 dependancies&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As you know, a slave needs to have at least all the PK3s of the server it connects too. But a slave can have more PK3s installed, as long as it has the ones on the server&#039;s pure list. This is what complicates things! The further you go down the &amp;quot;chain&amp;quot;, the more the chances exist of PK3 pollution, which makes the job of the last slave very hard. And the viewers connecting to that slave will not be very happy either.&lt;br /&gt;
&lt;br /&gt;
So for those of you venturing into chaining slaves here&#039;s a rule of thumb: &#039;&#039;&#039;always keep the installed PK3s to the bare minimum&#039;&#039;&#039;! Do not add stuff you do not need. If you want to know what PK3s you need and not need, connect your slave to the master or the hub, see which PK3s are on the pure list and rename or remove the PK3s that are not on the list. You will make your viewers and other admins connecting to your slave very happy.&lt;br /&gt;
&lt;br /&gt;
Another risk could be &#039;&#039;&#039;chained lag&#039;&#039;&#039;. If one of the slaves that is higher in the chain starts lagging, the consequenses for the slaves depending on it will be seen immedeatily. So if you offer to be one of the higher slaves in the chain, make sure your machine can handle it! An ETTV chain is much like the food chain ;-).&lt;br /&gt;
&lt;br /&gt;
==== Admin contributions ====&lt;br /&gt;
&lt;br /&gt;
If by now you feel like getting your hands dirty in ETTV chaining madness and you want to see some example of hubs, slaves, broadcasters and scripts to get it all working, you can already start by checking out [[User:Deej|deej&#039;s page]].&lt;br /&gt;
&lt;br /&gt;
==ETTV Demos==&lt;br /&gt;
ETTV can record and playback &#039;&#039;&#039;ETTV demos&#039;&#039;&#039;. ETTV demos have the extension .tv_84 (or .tv_83 for older versions) and are completely different from the .dm_84 demos recorded on clients. &lt;br /&gt;
&lt;br /&gt;
You may record the match in progress to a file, with the command:&lt;br /&gt;
:&amp;lt;tt&amp;gt;record &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
If you omit the demo name, ettv will start recording using a filename of demoXXXX where XXXX is the first available number starting from 0000.&lt;br /&gt;
&lt;br /&gt;
Demos will stop recording when a map changes.&lt;br /&gt;
&lt;br /&gt;
To stop recording a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;stoprecord&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To play back a recorded demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of an ettv slave:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv status&amp;lt;/tt&amp;gt;&lt;br /&gt;
This will tell you if the slave is connected to a master, or if it is currently playing back a demo.&lt;br /&gt;
&lt;br /&gt;
To fastforward a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;ff &amp;lt;i&amp;gt;&amp;lt;seconds&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
Eg &amp;lt;tt&amp;gt;ff 30&amp;lt;/tt&amp;gt; will fast foward 30 seconds. Fast forward stops at map restarts, so you can safely ff 999 to fast forward through a warmup. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: requires ettv beta 7 or later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Autorecording demos===&lt;br /&gt;
ettv is able to automatically continuously record demos, creating new demofiles when the map changes. To do this, set the cvar ettv_autorecord to 1. ettv will start recording demos with the name demoXXXX where XXXX is a number starting at 0000 and incrementing on each map change.&lt;br /&gt;
&lt;br /&gt;
Server admins may find it useful to use the demo recording feature of ettv to record matches, instead of requiring individual players to record them. An ettv demo records everything that happens on a server, including all player viewpoints.&lt;br /&gt;
&lt;br /&gt;
===How to create demo based delayed feeds===&lt;br /&gt;
Autorecording demos is the first half of the process for delayed feeds. Typically you would run a passworded slave server with the smallest number of sv_maxclients possible. No spectators should connect to this server. The only purpose of this slave is to connect up to the master and record the match to sequentially numbered demofiles.&lt;br /&gt;
&lt;br /&gt;
Now start up a slave, and tell it to broadcast the demo being recorded.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo demo0000&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wait approx. 60 seconds after the master begins recording before issuing this command to your slaves, then you have a 60 second delay on your broadcast.&lt;br /&gt;
&lt;br /&gt;
If you want slaves to automatically switch to the next demo when the end of the demo is reached (eg on a map change), you would set the cvar ettv_autoplay to 1. If a slave is playing demo0000 and it reaches the end, it will then try to play demo0001 and so on.&lt;br /&gt;
&lt;br /&gt;
Disadvantage of this method: It is not automated in ettv itself, though admins can script it.&lt;br /&gt;
Advantage of this method: You may run multiple broadcast servers from the same single demo stream.&lt;br /&gt;
&lt;br /&gt;
Automated delayed feeds are supported in ettv beta 8. See the above.&lt;br /&gt;
&lt;br /&gt;
===Playing back previously recorded ETTV demos===&lt;br /&gt;
This is essentially the same as delayed feeds above.&lt;br /&gt;
* Configure your server as described in [[ETTV:Server_Configuration#Installation_-_.22Slave.22_.28broadcast_server.29|Slave Installation]] section&lt;br /&gt;
* Obtain the &amp;lt;tt&amp;gt;.tv_*&amp;lt;/tt&amp;gt; demos and place them in &amp;lt;tt&amp;gt;&#039;&#039;fs_game&#039;&#039;/demos&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Start the ettv executable with pb disabled&lt;br /&gt;
* &amp;lt;tt&amp;gt;set ettv_autoplay 1&amp;lt;/tt&amp;gt; if you want to play back sequential demos named &amp;lt;tt&amp;gt;demo0000.tv_84&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;demo0001.tv_84&amp;lt;/tt&amp;gt; etc.&lt;br /&gt;
* &amp;lt;tt&amp;gt;demo &#039;&#039;&#039;&amp;lt;yourdemoname&amp;gt;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* connect a client and enjoy the show!&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* The slave server must be running the same fs_game setting as the master server.&lt;br /&gt;
* The slave server must have a copy of every map pk3 the master server is using.&lt;br /&gt;
* If the master server loads a map the slave server doesn&#039;t have, the slave will get stuck.&lt;br /&gt;
* Spectators will be forced to download any custom pk3 you are using.&lt;br /&gt;
* It is a good idea to keep the master server pk3 list to a minimum.&lt;br /&gt;
* If you are using the autorecord/autoplay feature for running delayed feeds, you will usually want to make sure you clear out the demos directory first. Autorecording will start numbering demofiles using the first available number, so if you have old recorded demos then ettv might start recording from eg demo0017. If your scripts expect to start playback from demo0000 then you might end up broadcasting a game recorded at some earlier date...&lt;br /&gt;
* If the broadcaster constantly reloads on round starts etc, it&#039;s probably a problem with too many pk3s on the ettv servers.&lt;br /&gt;
&lt;br /&gt;
==Miscellaneous==&lt;br /&gt;
* Slaves may send chats to the master with the command msay&lt;br /&gt;
* Slaves may list players on the master with the command players&lt;br /&gt;
&lt;br /&gt;
==Performance tuning==&lt;br /&gt;
&lt;br /&gt;
Spectator servers with large numbers of clients (eg &amp;gt;100) will push the OS very hard with huge amounts of UDP traffic. The default OS buffer settings for Linux are inadequate and can hurt performance, causing lag and/or disconnects.&lt;br /&gt;
&lt;br /&gt;
If you get messages like&lt;br /&gt;
:&amp;lt;tt&amp;gt;NET_SendPacket ERROR: No buffer space available to 192.168.120.142:27960&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you definitely need to increase your kernel network buffers.&lt;br /&gt;
&lt;br /&gt;
Large spectator servers should increase the kernel buffers.&lt;br /&gt;
&lt;br /&gt;
The following commands should be issued as root on linux:&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values will be lost on a reboot of your system. A good way to reapply the values upon boot is to include the following in your /etc/sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.rmem_default = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.rmem_max = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.wmem_default = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;net.core.wmem_max = 524288&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FreeBSD can try this:&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.recvspace=65535&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.maxdgram=57344&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w kern.ipc.maxsockbuf=8388608&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Network tuning cvars===&lt;br /&gt;
;The following are only available in ettv beta 7 and later.&lt;br /&gt;
By default, et uses small packets of 1400 bytes or less to send to clients. If messages need to be larger, they are &#039;fragmented&#039; and sent over several server frames. ettv slave messages tend to be large and often fragment. ettv normally tries to send slaves all fragments at once to avoid jittery playback, but some networks / OSes handle this badly. ettv beta 7 introduces new controls so admins can optimize ettv for their individual network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_netblast&#039;&#039;&#039; (default 1)&lt;br /&gt;
:by default, ettv tries to send all fragments at once. some networks may handle this badly. setting this to 0 disables. warning: setting this to 0 without increasing ettv_mtu will result in severely laggy slave playback.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_mtu&#039;&#039;&#039; (default 1400)&lt;br /&gt;
:; master only&lt;br /&gt;
:if your network / os supports it, you can set this to large values (eg 16000) to prevent message fragmentation and provide smoother ettv links. this cvar has no effect on normal ET clients. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: ettv_mtu must currently be set from commandline, it cannot be changed on the fly (yet).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_tv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:you can set the ip type of service field of ettv link packets. if your network/ISP supports it, you can use a value like 16 (&amp;quot;minimize delay&amp;quot;) to prioritize ettv link packets over others on the network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:same as ettv_tv_iptos, but affects packets for normal ET clients.&lt;br /&gt;
&lt;br /&gt;
===Article Reference===&lt;br /&gt;
(x86|exe) refers to the file extension of the ettv file, for linux use .x86 and for windows use .exe&lt;br /&gt;
(so|dll) refers to the file extension of the slave file, for linux use .so and for windows use .dll&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User_talk:Dersaidin&amp;diff=2376</id>
		<title>User talk:Dersaidin</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User_talk:Dersaidin&amp;diff=2376"/>
		<updated>2006-07-05T13:53:02Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Good work but I&#039;ll give you a heads-up: ReyalP might end up slapping you with the preview stick ;-). [[User:Deej|deej]] 06:53, 5 July 2006 (PDT)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=EDV&amp;diff=2375</id>
		<title>EDV</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=EDV&amp;diff=2375"/>
		<updated>2006-07-05T13:41:14Z</updated>

		<summary type="html">&lt;p&gt;Deej: some spelling &amp;amp; punctation stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;EDV stands for Extended Demo Viewer. It&#039;s a tool which gives you camera-moving possibilities. The most important options are the freecam and the weaponcam.&lt;br /&gt;
&lt;br /&gt;
The freecam gives you the ability to watch a demo as a spectator, in other words you can freely fly around the map using your ingame movement&lt;br /&gt;
keys. type &#039;&#039;/freecam&#039;&#039; in the console to enable it. If you want fly through walls, you can use the well known &amp;quot;noclip&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you move&lt;br /&gt;
out of the pvs of the demo (the pvs of the player who recorded the demo), you won&#039;t see anything at all. Sometimes it&#039;s hard to find your way&lt;br /&gt;
back to the pvs, if you set the cvar b_demo_pvshint to 1, a line will be drawn from the camera origin to the demo-recorder&#039;s origin, in addition of noclip you will easily find your way back to the pvs. If &#039;&#039;b_predefineddemokeys&#039;&#039; is set to 1 you will be able to use the&lt;br /&gt;
hardcoded keys from the demohelpmenu, KP_ENTER is the key to toggle freecam, but I recommend that you set &#039;&#039;b_predefineddemokeys&#039;&#039; to 0 because in this doc the cvars/cmd&#039;s will be explained.&lt;br /&gt;
&lt;br /&gt;
With &amp;quot;freecamgetpos&amp;quot; you can retrieve the position of the camera, and with &amp;quot;freecamsetpos&amp;quot; you can set it. When you set &#039;&#039;b_demo_lookat&#039;&#039; to a clientNum (default value is -1 = turned off) the camera will always look at that player. You can reveal the clientNums with b_demo_nametag +4 (nametags are actually floating playernames): +1 draws nametags from players who are in your pvs, +2 from every player, +4 adds the clientnumber to the nametag, +8 adds the class (letter) to the nametag. The same option exists for dynamites: &#039;&#039;b_demo_dynamitecounter&#039;&#039; which draws a floating timer for every dynamite in your current fov.&lt;br /&gt;
&lt;br /&gt;
If you want turn the camera with some keys, use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+freecam_turnup&lt;br /&gt;
+freecam_turndown&lt;br /&gt;
+freecam_turnleft&lt;br /&gt;
+freecam_turnright&lt;br /&gt;
+freecam_rollleft&lt;br /&gt;
+freecam_rollright&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
the cvars &#039;&#039;&#039;b_demo_yawturnspeed b_demo_pitchturnspeed b_demo_rollspeed&#039;&#039;&#039;, will control the speed of these commands&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;b_demo_playersprites&#039;&#039; turns of player sprites in demoplay (the docs icon, the ! mark, ...)&lt;br /&gt;
&lt;br /&gt;
The weaponcam attaches the camera to a missile (grenade, panzer, dynamite)&lt;br /&gt;
&lt;br /&gt;
set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
b_demo_grenadecam +1 to follow grenades&lt;br /&gt;
b_demo_grenadecam +2 to follow airstrike/smokegrenade cannisters&lt;br /&gt;
b_demo_mortarcam 1 to follow mortars&lt;br /&gt;
b_demo_panzercam 1 to follow panzers&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
b_demo_teamonlymissilecam 1 if you only want to see the missiles of your teammates&lt;br /&gt;
&lt;br /&gt;
next cvars control the distance from the camera to the missile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
b_demo_followxDistance&lt;br /&gt;
b_demo_followyDistance&lt;br /&gt;
b_demo_followzDistance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;b_demo_nopitch&#039;&#039; toggles the camera pitching when attached to a missile&lt;br /&gt;
&lt;br /&gt;
If you want a good config, read this thread: http://bani.anime.net/banimod/forums/viewtopic.php?t=3207&lt;br /&gt;
&lt;br /&gt;
Auto change timescale to b_demo_autotimescale in weaponcam if the weapon is set in b_demo_autotimescaleweapons (bitflag)&lt;br /&gt;
* 1 = panzer&lt;br /&gt;
* 2 = grenade&lt;br /&gt;
* 4 = dynamite&lt;br /&gt;
* 8 = mortar&lt;br /&gt;
* 16 = smoke&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Lua_Tutorials&amp;diff=2225</id>
		<title>Lua Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Lua_Tutorials&amp;diff=2225"/>
		<updated>2006-04-27T09:03:59Z</updated>

		<summary type="html">&lt;p&gt;Deej: it&amp;#039;s madness...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
This page isn&#039;t finished but it is supposed to make you understand [[ETPro]] [http://www.lua.org/ lua] functions.&lt;br /&gt;
&lt;br /&gt;
Before you start on this tutorial I assume you know basic [http://www.lua.org/ lua] scripting. If not then I suggest you take a look at the online edition of the book [http://www.lua.org/pil/ Programming in Lua] or the [http://lua-users.org/wiki/ lua-users wiki].&lt;br /&gt;
You can also take a look at someone else his code, a list of [[ETPro]] mods can be found [[:Category:ETPro:Mods|here]].&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
===Loading a Script===&lt;br /&gt;
:Scripts are loaded by their file name out of the /etpro sub directory of your Enemy Territory installation, so don&#039;t forget to save them in the right folder.&amp;lt;br&amp;gt;&lt;br /&gt;
:if you want to load HelloWorld.lua you would have to set the server cvar &#039;&#039;&#039;lua_modules&#039;&#039;&#039; to &#039;&#039;&amp;quot;HelloWorld.lua&amp;quot;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
:If you want to load more mods you can add them to the same variables separated by a space like &#039;&#039;&amp;quot;HelloWorld.lua lol.lua pingpong.lua&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if you modify this cvar all currently loaded [http://www.lua.org/ lua] modules will be unloaded.&lt;br /&gt;
&lt;br /&gt;
:After editing your script you save it and then reload it in [[ETPro]] to make your chances take effect, this can simply be done by &#039;&#039;&#039;reset_match&#039;&#039;&#039; server command.&lt;br /&gt;
&lt;br /&gt;
===Development Environment===&lt;br /&gt;
:While scripting you will see your code gets hard to read, its much easier to read with syntax highlighting. This can be done be scripting inside an [http://www.lua.org/ lua] development environment.&lt;br /&gt;
&lt;br /&gt;
:At [http://lua-users.org/wiki/LuaAddons this page] under &#039;&#039;[http://lua-users.org/wiki/LuaAddons development environments]&#039;&#039; you will find a list of [http://lua-users.org/wiki/LuaAddons development environments].&lt;br /&gt;
&lt;br /&gt;
==Tutorials==&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Lines written in &#039;&#039;&#039;Bold&#039;&#039;&#039; are the actual lines we are going to write in our script.&lt;br /&gt;
===Hello World===&lt;br /&gt;
:Here we will show a simple hello world example for the server console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it HelloWorld.lua.&lt;br /&gt;
&lt;br /&gt;
::Now we need an [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] when we want it. Therefore we will use &#039;&#039;et_InitGame(levelTime,randomSeed,restart)&#039;&#039;. That function is called once every round at the beginning. It&#039;s a good function to do some initial settings. We do not have to worry about those parameters (levelTime,randomSeed,restart) in this example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_InitGame(levelTime,randomSeed,restart) -- called at beginning of a gameround&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we got a part of our script that is called at the beginning of a round so now we can add our code to it. We are going to print &#039;&#039;&amp;quot;hello world&amp;quot;&#039;&#039; in the server console. To do this we will use &#039;&#039;et.G_Print(&amp;quot;message&amp;quot;)&#039;&#039;. That function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the server console.&lt;br /&gt;
&lt;br /&gt;
:3. At line &#039;&#039;2&#039;&#039; we will write &#039;&#039;&#039;    et.G_Print(&amp;quot;Hello World!!!\n&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Lastly we need to end out function at line &#039;&#039;1&#039;&#039; with a simple &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_InitGame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloWorld.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_InitGame(levelTime,randomSeed,restart) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- called at beginning of a gameround&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.G_Print(&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;Hello World!!!\n&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--close et_InitGame()&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Now save and load your script and you will see Hello World!!! in the server console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
===Hello Spam===&lt;br /&gt;
:Here we will show a simple Spammy hello world example for the server console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it &#039;&#039;&#039;HelloSpam.lua&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
::Now we need an [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] many times to make it spammy. Therefore we will use &#039;&#039;et_RunFrame(levelTime)&#039;&#039;. That function is called every server frame. It is a good function for stuff you need to constantly check but you should not put to much code in here. We do not have to worry about those parameter (levelTime) in this example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_RunFrame(levelTime) --called every serverframe&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we got a part of our script that is called at the beginning of a round so, now we can add our code to it. We are going to print &#039;&#039;&amp;quot;hello world&amp;quot;&#039;&#039; in the server console. To do this we will use &#039;&#039;et.G_Print(&amp;quot;message&amp;quot;)&#039;&#039;; that function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the server console&lt;br /&gt;
&lt;br /&gt;
:3. Now at line &#039;&#039;2&#039;&#039; we will write &#039;&#039;&#039;    et.G_Print(&amp;quot;Hello Spam!!!\n&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Lastly we need to end our function at line &#039;&#039;1&#039;&#039; with a simple at line &#039;&#039;3&#039;&#039; &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_RunFrame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloSpam.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_RunFrame(levelTime) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--called every serverframe&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.G_Print(&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;Hello Spam!!!\n&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--close et_RunFrame()&amp;lt;/font&amp;gt;&lt;br /&gt;
::Now save and load your script and you will see Hello Spam!!! in the server console.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
===Hello Client===&lt;br /&gt;
:Here we will show a simple hello world example for the client console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it HelloClient.lua.&lt;br /&gt;
&lt;br /&gt;
::Now we need a [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] when we want it. To do this we will use &#039;&#039;et_InitGame(levelTime,randomSeed,restart)&#039;&#039; as shown in the &#039;&#039;Hello World&#039;&#039; example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_InitGame(levelTime,randomSeed,restart) --called at beginning of a gameround&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we need a function to print a message to the client his console. We will use et.trap_SendServerCommand(-1,&amp;quot;print \&amp;quot;message\n\&amp;quot;&amp;quot;)&#039;&#039; to achieve this. That function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the client&#039;s console.&lt;br /&gt;
::The first parameter is the client slot to send to. When this is -1 ETPro will send the message to all clients. The 2nd parameter looks confusing and like the original author&#039;s spelling, it is. First you have the main command witch is &amp;quot;print  ..&amp;quot;. Then, at the place of the dots, comes the data to send with the print. In our case this is &amp;quot;message\n&amp;quot;&amp;quot;.&lt;br /&gt;
::The \n will send a newline command to the console so the next message written to the console is on the next line. The \&amp;quot; are just quotes but since they are already inside a string you need to prefix them with a \ (commonly known as an escape character).&lt;br /&gt;
&lt;br /&gt;
:3. So just write this at line &#039;&#039;2&#039;&#039; &#039;&#039;&#039;    et.trap_SendServerCommand(-1,&amp;quot;print \&amp;quot;Hello Client\n\&amp;quot;&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Last we need to end our function at line &#039;&#039;1&#039;&#039; with a simple &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_InitGame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloClient.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_InitGame(levelTime,randomSeed,restart) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- called at beginning of a gameround&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.trap_SendServerCommand(-&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;1&amp;lt;/font&amp;gt;,&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;print \&amp;quot;Hello Client\n\&amp;quot;&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- close et_InitGame()&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Now save and load your script and you will see Hello World!!! in the client&#039;s console at the begin of a round.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
[[Category:ETPro]]&lt;br /&gt;
[[Category:ETPro:Mods]]&lt;br /&gt;
[[Category:ETPro:LUA]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Lua_Tutorials&amp;diff=2224</id>
		<title>Lua Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Lua_Tutorials&amp;diff=2224"/>
		<updated>2006-04-27T09:01:51Z</updated>

		<summary type="html">&lt;p&gt;Deej: whipped out the spelling &amp;amp; grammer stick but surely missed a few ones&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
This page isn&#039;t finished but its supposed to make you understand [[ETPro]] [http://www.lua.org/ lua] functions.&lt;br /&gt;
&lt;br /&gt;
Before you start on this tutorial it&#039;s assumed you do know basic [http://www.lua.org/ lua] scripting. If not then I suggest you take a look at the online edition of the book [http://www.lua.org/pil/ Programming in Lua] or the [http://lua-users.org/wiki/ lua-users wiki].&lt;br /&gt;
You can also take a look at someone else his code, a list of [[ETPro]] mods can be found [[:Category:ETPro:Mods|here]].&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
===Loading a Script===&lt;br /&gt;
:Scripts are loaded by their file name out of the /etpro sub directory of your Enemy Territory installation, so don&#039;t forget to save them in the right folder.&amp;lt;br&amp;gt;&lt;br /&gt;
:if you want to load HelloWorld.lua you would have to set the server cvar &#039;&#039;&#039;lua_modules&#039;&#039;&#039; to &#039;&#039;&amp;quot;HelloWorld.lua&amp;quot;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
:If you want to load more mods you can add them to the same variables separated by a space like &#039;&#039;&amp;quot;HelloWorld.lua lol.lua pingpong.lua&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if you modify this cvar all currently loaded [http://www.lua.org/ lua] modules will be unloaded.&lt;br /&gt;
&lt;br /&gt;
:After editing your script you save it and then reload it in [[ETPro]] to make your chances take effect, this can simply be done by &#039;&#039;&#039;reset_match&#039;&#039;&#039; server command.&lt;br /&gt;
&lt;br /&gt;
===Development Environment===&lt;br /&gt;
:While scripting you will see your code gets hard to read, its much easier to read with syntax highlighting. This can be done be scripting inside an [http://www.lua.org/ lua] development environment.&lt;br /&gt;
&lt;br /&gt;
:At [http://lua-users.org/wiki/LuaAddons this page] under &#039;&#039;[http://lua-users.org/wiki/LuaAddons development environments]&#039;&#039; you will find a list of [http://lua-users.org/wiki/LuaAddons development environments].&lt;br /&gt;
&lt;br /&gt;
==Tutorials==&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Lines written in &#039;&#039;&#039;Bold&#039;&#039;&#039; are the actual lines we are going to write in our script.&lt;br /&gt;
===Hello World===&lt;br /&gt;
:Here we will show a simple hello world example for the server console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it HelloWorld.lua.&lt;br /&gt;
&lt;br /&gt;
::Now we need an [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] when we want it. Therefore we will use &#039;&#039;et_InitGame(levelTime,randomSeed,restart)&#039;&#039;. That function is called once every round at the beginning. It&#039;s a good function to do some initial settings. We do not have to worry about those parameters (levelTime,randomSeed,restart) in this example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_InitGame(levelTime,randomSeed,restart) -- called at beginning of a gameround&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we got a part of our script that is called at the beginning of a round so now we can add our code to it. We are going to print &#039;&#039;&amp;quot;hello world&amp;quot;&#039;&#039; in the server console. To do this we will use &#039;&#039;et.G_Print(&amp;quot;message&amp;quot;)&#039;&#039;. That function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the server console.&lt;br /&gt;
&lt;br /&gt;
:3. At line &#039;&#039;2&#039;&#039; we will write &#039;&#039;&#039;    et.G_Print(&amp;quot;Hello World!!!\n&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::And as last we need to end out function at line &#039;&#039;1&#039;&#039; whit a simple &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_InitGame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloWorld.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_InitGame(levelTime,randomSeed,restart) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- called at beginning of a gameround&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.G_Print(&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;Hello World!!!\n&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--close et_InitGame()&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Now save and load your script and you will see Hello World!!! in the server console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
===Hello Spam===&lt;br /&gt;
:Here we will show a simple Spammy hello world example for the server console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it &#039;&#039;&#039;HelloSpam.lua&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
::Now we need an [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] many times to make it spammy. Therefore we will use &#039;&#039;et_RunFrame(levelTime)&#039;&#039;. That function is called every server frame. It is a good function for stuff you need to constantly check but you should not put to much code in here. We do not have to worry about those parameter (levelTime) in this example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_RunFrame(levelTime) --called every serverframe&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we got a part of our script that is called at the beginning of a round so, now we can add our code to it. We are going to print &#039;&#039;&amp;quot;hello world&amp;quot;&#039;&#039; in the server console. To do this we will use &#039;&#039;et.G_Print(&amp;quot;message&amp;quot;)&#039;&#039;; that function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the server console&lt;br /&gt;
&lt;br /&gt;
:3. Now at line &#039;&#039;2&#039;&#039; we will write &#039;&#039;&#039;    et.G_Print(&amp;quot;Hello Spam!!!\n&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::And lastly we need to end our function at line &#039;&#039;1&#039;&#039; whit a simple at line &#039;&#039;3&#039;&#039; &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_RunFrame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloSpam.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_RunFrame(levelTime) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--called every serverframe&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.G_Print(&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;Hello Spam!!!\n&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--close et_RunFrame()&amp;lt;/font&amp;gt;&lt;br /&gt;
::Now save and load your script and you will see Hello Spam!!! in the server console.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
===Hello Client===&lt;br /&gt;
:Here we will show a simple hello world example for the client console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it HelloClient.lua.&lt;br /&gt;
&lt;br /&gt;
::Now we need a [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] when we want it. To do this we will use &#039;&#039;et_InitGame(levelTime,randomSeed,restart)&#039;&#039; as shown in the &#039;&#039;Hello World&#039;&#039; example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_InitGame(levelTime,randomSeed,restart) --called at beginning of a gameround&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we need a function to print a message to the client his console. We will use et.trap_SendServerCommand(-1,&amp;quot;print \&amp;quot;message\n\&amp;quot;&amp;quot;)&#039;&#039; to achieve this. That function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the client&#039;s console.&lt;br /&gt;
::The first parameter is the client slot to send to. When this is -1 ETPro will send the message to all clients. The 2nd parameter looks confusing and like the original author&#039;s spelling, it is. First you have the main command witch is &amp;quot;print  ..&amp;quot;. Then, at the place of the dots, comes the data to send with the print. In our case this is &amp;quot;message\n&amp;quot;&amp;quot;.&lt;br /&gt;
::The \n will send a newline command to the console so the next message written to the console is on the next line. The \&amp;quot; are just quotes but since they are already inside a string you need to prefix them with a \ (commonly known as an escape character).&lt;br /&gt;
&lt;br /&gt;
:3. So just write this at line &#039;&#039;2&#039;&#039; &#039;&#039;&#039;    et.trap_SendServerCommand(-1,&amp;quot;print \&amp;quot;Hello Client\n\&amp;quot;&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Last we need to end our function at line &#039;&#039;1&#039;&#039; with a simple &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_InitGame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloClient.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_InitGame(levelTime,randomSeed,restart) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- called at beginning of a gameround&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.trap_SendServerCommand(-&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;1&amp;lt;/font&amp;gt;,&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;print \&amp;quot;Hello Client\n\&amp;quot;&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- close et_InitGame()&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Now save and load your script and you will see Hello World!!! in the client&#039;s console at the begin of a round.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
[[Category:ETPro]]&lt;br /&gt;
[[Category:ETPro:Mods]]&lt;br /&gt;
[[Category:ETPro:LUA]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Lua_Tutorials&amp;diff=2223</id>
		<title>Lua Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Lua_Tutorials&amp;diff=2223"/>
		<updated>2006-04-27T09:00:58Z</updated>

		<summary type="html">&lt;p&gt;Deej: whipped out the spelling &amp;amp; grammer stick but surely missed a few ones&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
This page isn&#039;t finished but its supposed to make you understand [[ETPro]] [http://www.lua.org/ lua] functions.&lt;br /&gt;
&lt;br /&gt;
Before you start on this tutorial its assumed you do know basic [http://www.lua.org/ lua] scripting ,if not then I suggest you take a look at the online edition of the book [http://www.lua.org/pil/ Programming in Lua] or the [http://lua-users.org/wiki/ lua-users wiki].&lt;br /&gt;
You can also take a look at someone else his code, a list of [[ETPro]] mods can be found [[:Category:ETPro:Mods|here]].&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
===Loading a Script===&lt;br /&gt;
:Scripts are loaded by their file name out of the /etpro sub directory of your Enemy Territory installation, so don&#039;t forget to save them in the right folder.&amp;lt;br&amp;gt;&lt;br /&gt;
:if you want to load HelloWorld.lua you would have to set the server cvar &#039;&#039;&#039;lua_modules&#039;&#039;&#039; to &#039;&#039;&amp;quot;HelloWorld.lua&amp;quot;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
:If you want to load more mods you can add them to the same variables separated by a space like &#039;&#039;&amp;quot;HelloWorld.lua lol.lua pingpong.lua&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if you modify this cvar all currently loaded [http://www.lua.org/ lua] modules will be unloaded.&lt;br /&gt;
&lt;br /&gt;
:After editing your script you save it and then reload it in [[ETPro]] to make your chances take effect, this can simply be done by &#039;&#039;&#039;reset_match&#039;&#039;&#039; server command.&lt;br /&gt;
&lt;br /&gt;
===Development Environment===&lt;br /&gt;
:While scripting you will see your code gets hard to read, its much easier to read with syntax highlighting. This can be done be scripting inside an [http://www.lua.org/ lua] development environment.&lt;br /&gt;
&lt;br /&gt;
:At [http://lua-users.org/wiki/LuaAddons this page] under &#039;&#039;[http://lua-users.org/wiki/LuaAddons development environments]&#039;&#039; you will find a list of [http://lua-users.org/wiki/LuaAddons development environments].&lt;br /&gt;
&lt;br /&gt;
==Tutorials==&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Lines written in &#039;&#039;&#039;Bold&#039;&#039;&#039; are the actual lines we are going to write in our script.&lt;br /&gt;
===Hello World===&lt;br /&gt;
:Here we will show a simple hello world example for the server console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it HelloWorld.lua.&lt;br /&gt;
&lt;br /&gt;
::Now we need an [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] when we want it. Therefore we will use &#039;&#039;et_InitGame(levelTime,randomSeed,restart)&#039;&#039;. That function is called once every round at the beginning. It&#039;s a good function to do some initial settings. We do not have to worry about those parameters (levelTime,randomSeed,restart) in this example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_InitGame(levelTime,randomSeed,restart) -- called at beginning of a gameround&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we got a part of our script that is called at the beginning of a round so now we can add our code to it. We are going to print &#039;&#039;&amp;quot;hello world&amp;quot;&#039;&#039; in the server console. To do this we will use &#039;&#039;et.G_Print(&amp;quot;message&amp;quot;)&#039;&#039;. That function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the server console.&lt;br /&gt;
&lt;br /&gt;
:3. At line &#039;&#039;2&#039;&#039; we will write &#039;&#039;&#039;    et.G_Print(&amp;quot;Hello World!!!\n&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::And as last we need to end out function at line &#039;&#039;1&#039;&#039; whit a simple &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_InitGame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloWorld.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_InitGame(levelTime,randomSeed,restart) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- called at beginning of a gameround&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.G_Print(&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;Hello World!!!\n&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--close et_InitGame()&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Now save and load your script and you will see Hello World!!! in the server console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
===Hello Spam===&lt;br /&gt;
:Here we will show a simple Spammy hello world example for the server console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it &#039;&#039;&#039;HelloSpam.lua&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
::Now we need an [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] many times to make it spammy. Therefore we will use &#039;&#039;et_RunFrame(levelTime)&#039;&#039;. That function is called every server frame. It is a good function for stuff you need to constantly check but you should not put to much code in here. We do not have to worry about those parameter (levelTime) in this example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_RunFrame(levelTime) --called every serverframe&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we got a part of our script that is called at the beginning of a round so, now we can add our code to it. We are going to print &#039;&#039;&amp;quot;hello world&amp;quot;&#039;&#039; in the server console. To do this we will use &#039;&#039;et.G_Print(&amp;quot;message&amp;quot;)&#039;&#039;; that function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the server console&lt;br /&gt;
&lt;br /&gt;
:3. Now at line &#039;&#039;2&#039;&#039; we will write &#039;&#039;&#039;    et.G_Print(&amp;quot;Hello Spam!!!\n&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::And lastly we need to end our function at line &#039;&#039;1&#039;&#039; whit a simple at line &#039;&#039;3&#039;&#039; &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_RunFrame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloSpam.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_RunFrame(levelTime) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--called every serverframe&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.G_Print(&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;Hello Spam!!!\n&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;--close et_RunFrame()&amp;lt;/font&amp;gt;&lt;br /&gt;
::Now save and load your script and you will see Hello Spam!!! in the server console.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
===Hello Client===&lt;br /&gt;
:Here we will show a simple hello world example for the client console.&lt;br /&gt;
:Just follow the steps and read the comments.&lt;br /&gt;
&lt;br /&gt;
:1. First we need a new file so, create a new file and name it HelloClient.lua.&lt;br /&gt;
&lt;br /&gt;
::Now we need a [[ETPro]] [http://www.lua.org/ lua] function that will be called automatically by [[ETPro]] when we want it. To do this we will use &#039;&#039;et_InitGame(levelTime,randomSeed,restart)&#039;&#039; as shown in the &#039;&#039;Hello World&#039;&#039; example.&lt;br /&gt;
&lt;br /&gt;
:2. Inside our file at line &#039;&#039;1&#039;&#039; we will write &#039;&#039;&#039;function et_InitGame(levelTime,randomSeed,restart) --called at beginning of a gameround&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now we need a function to print a message to the client his console. We will use et.trap_SendServerCommand(-1,&amp;quot;print \&amp;quot;message\n\&amp;quot;&amp;quot;)&#039;&#039; to achieve this. That function will simply print the &#039;&#039;&amp;quot;message&amp;quot;&#039;&#039; in the client&#039;s console.&lt;br /&gt;
::The first parameter is the client slot to send to. When this is -1 ETPro will send the message to all clients. The 2nd parameter looks confusing and like the original author&#039;s spelling, it is. First you have the main command witch is &amp;quot;print  ..&amp;quot;. Then, at the place of the dots, comes the data to send with the print. In our case this is &amp;quot;message\n&amp;quot;&amp;quot;.&lt;br /&gt;
::The \n will send a newline command to the console so the next message written to the console is on the next line. The \&amp;quot; are just quotes but since they are already inside a string you need to prefix them with a \ (commonly known as an escape character).&lt;br /&gt;
&lt;br /&gt;
:3. So just write this at line &#039;&#039;2&#039;&#039; &#039;&#039;&#039;    et.trap_SendServerCommand(-1,&amp;quot;print \&amp;quot;Hello Client\n\&amp;quot;&amp;quot;) -- printout our text to the console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Last we need to end our function at line &#039;&#039;1&#039;&#039; with a simple &#039;&#039;end&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:4. At line &#039;&#039;3&#039;&#039; place &#039;&#039;&#039;end --close et_InitGame()&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
::Now if you did it right you should have something like [http://home.zonnet.nl/westhof99/lua/HelloClient.lua this]:&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;function&amp;lt;/font&amp;gt; et_InitGame(levelTime,randomSeed,restart) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- called at beginning of a gameround&amp;lt;/font&amp;gt;&lt;br /&gt;
     et.trap_SendServerCommand(-&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;1&amp;lt;/font&amp;gt;,&amp;lt;font color=&amp;quot;darkblue&amp;quot;&amp;gt;&amp;quot;print \&amp;quot;Hello Client\n\&amp;quot;&amp;quot;&amp;lt;/font&amp;gt;) &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- printout our text to the console&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;end&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;-- close et_InitGame()&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::Now save and load your script and you will see Hello World!!! in the client&#039;s console at the begin of a round.&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
[[Category:ETPro]]&lt;br /&gt;
[[Category:ETPro:Mods]]&lt;br /&gt;
[[Category:ETPro:LUA]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Talk:B_placebo&amp;diff=2194</id>
		<title>Talk:B placebo</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Talk:B_placebo&amp;diff=2194"/>
		<updated>2006-04-24T17:39:51Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some people feel that [[B_placebo]] should require a vid_restart, or even a full game restart after changes, to prevent abuse (see [[Placebo Scripts]]). Discuss. &lt;br /&gt;
&lt;br /&gt;
:[[User:ReyalP|ReyalP]] 00:59, 22 April 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I think that simply delaying the change should be sufficient, as usually even those who use Placebo Scripts want b_placebo on 90% of the time.  It&#039;s just a few points in time where they need to quickly switch it off that is the problem.  Delaying it would nullify any abuses I can think of.  Another thing may be to make it only server-side.  And to prevent it from being changed without users noticing after a map change or warm-up ends, there could be either a visual or audio indication as to b_placebo status.&lt;br /&gt;
:--[[User:WeblionX|WeblionX]] 16:02, 22 April 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
Why don&#039;t make it like the regionCode in standalone DVD-Players. Let them change, hmm lets say,  5 times, then keep the current setting until they die.&lt;br /&gt;
So they have some time to test if they prefer either 0 or 1 --[[User:Deus|Deus]] 01:08, 23 April 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
That would be good, but people seem to bypass region codes too easily. :\&lt;br /&gt;
:--[[User:WeblionX|WeblionX]] 10:46, 23 April 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
You are really limiting yourself if you only use 0 and 1&lt;br /&gt;
:--[[User:ReyalP|ReyalP]] 16:56, 23 April 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
George Boole just turned in his grave ReyalP ;-) -- [[User:Deej|deej]] 10:39, 24 April 2006 (PDT)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2140</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2140"/>
		<updated>2006-04-06T12:31:52Z</updated>

		<summary type="html">&lt;p&gt;Deej: tweaked oldschool script a bit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, and as from ETTV b9 the slaves are in fact not limited at all by the original ET netcode, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub. The script generates the server.cfg dynamically every time you start it. If you just want to generate server.cfg do &amp;lt;code&amp;gt;./hub.sh sim&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                    ettv delayed hub script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`		# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;	# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;			# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
HUB_IP=&amp;quot;$PERONI_IP&amp;quot;			# This host is Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;30000&amp;quot;			# Port of public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;	# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
HUB_DELAY=&amp;quot;1&amp;quot;				# Delay between live match &amp;amp; hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;				# 1 ETTV slave connects at an UNLIMITED rate!&lt;br /&gt;
HUB_PRIVATE_SLOTS=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;				# Record the game?&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;				# Slaves don&#039;t download from the hub&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are high enough!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $HUB_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $HUB_SLAVES \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $HUB_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -n $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $HUB_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$HUB_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$HUB_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$HUB_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$HUB_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $HUB_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$HUB_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$HUB_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects a delayed or undelayed slave to a Hub or directly to a gameserver. The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Use &amp;lt;code&amp;gt;./slave.sh sim&amp;lt;/code&amp;gt; to only create etmain/server.cfg. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ETTV slave script                         #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to an ETTV HUB or directly to a game server.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? deej@fragland.org or go to #gamestv.org            #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
# &lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# HUB / Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;				# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
SLAVE_IP=&amp;quot;$PERONI_IP&amp;quot;				# This host is Peroni&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;				# port of public broadcaster&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;	# shows up on the Hub&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;20&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;5&amp;quot;				# Allow chaining?&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;					# 1 = record game, 0 = don&#039;t&lt;br /&gt;
SLAVE_DELAY=&amp;quot;60&amp;quot;				# Time in seconds&lt;br /&gt;
&lt;br /&gt;
REDIRECT=&amp;quot;Server is full&amp;quot;			# Message displayed when server is full&lt;br /&gt;
#REDIRECT=&amp;quot;ET://ettv2.fragland.org:27960&amp;quot;	# Allows redirecting to other ettv&#039;s&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Downloading&lt;br /&gt;
#&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;					# Can clients download stuff?&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;		# Path to ettv.x86&lt;br /&gt;
						# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are ok!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set com_hunkMegs 256 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	#&lt;br /&gt;
	# Start the slave&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	if [ $SLAVE_ETTV_SLAVES != 0 ]&lt;br /&gt;
		then&lt;br /&gt;
			echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
			echo -e &amp;quot;tv connect $SLAVE_IP:$SLAVE_PORT $SLAVE_ETTV_PASS $SLAVE_PASS\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $SLAVE_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$SLAVE_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$SLAVE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$SLAVE_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$SLAVE_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $SLAVE_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$SLAVE_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$SLAVE_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		$0 start&lt;br /&gt;
		;;	&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
KLEIN_IP=&amp;quot;83.243.82.88&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`		# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27970&amp;quot;	# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;	# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[put_your_pass_here]&amp;quot;	# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Match info for setting hostname &amp;amp; storing demos&lt;br /&gt;
#&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;NED&amp;quot;&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;BEL&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;NationsCup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=&amp;quot;$KLEIN_IP&amp;quot;			# Select from list above&lt;br /&gt;
RECORDER_PORT=&amp;quot;29995&amp;quot;			# Port of the private recorder&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RECORDER_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
SLAVE_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;	# /rcon g_password &amp;quot;&amp;quot; to clear&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SLAVE_DELAY=&amp;quot;60&amp;quot;			# Delay between live match &amp;amp;&lt;br /&gt;
					# broadcaster in seconds&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;25&amp;quot;&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;			# Allow chaining?&lt;br /&gt;
&lt;br /&gt;
REDIRECT=&amp;quot;Server is full&amp;quot;		# Message displayed when server is full&lt;br /&gt;
#REDIRECT=&amp;quot;ET://ettv2.fragland.org:27960&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Download settings&lt;br /&gt;
#&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://wwww.fragland.org/maps&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV&amp;quot;			# Use absolute paths here!&lt;br /&gt;
RECORDER_BASEPATH=&amp;quot;$BASEPATH/ettv_recorder&amp;quot;&lt;br /&gt;
SLAVE_BASEPATH=&amp;quot;$BASEPATH/ettv_slave&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are ok!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;262144&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;262144&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
MATCH=&amp;quot;&amp;quot;$MATCH_HOME_TEAM&amp;quot;vs&amp;quot;$MATCH_AWAY_TEAM&amp;quot;&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
RECORDER_DAEMON=&amp;quot;$RECORDER_BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
SLAVE_DAEMON=&amp;quot;$SLAVE_BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $RECORDER_BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+exec recorder.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $SLAVE_BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+exec slave.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Only add for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
#+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$RECORDER_DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;Sleeping for $SLAVE_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SLAVE_DELAY&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$SLAVE_DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo $RECORDER_PID&lt;br /&gt;
	renice -8 $RECORDER_PID&lt;br /&gt;
	echo -n &amp;quot;Broadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID\n&amp;quot;&lt;br /&gt;
	renice -7 $SLAVE_PID&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH&lt;br /&gt;
		ls -l $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l $BASEPATH/$MATCH/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_recorder_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/recorder.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	RECORDER_CFG=&amp;quot;$RECORDER_BASEPATH/etmain/recorder.cfg&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;// config generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_maxclients 2&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set sv_privateclients 0&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$RECORDER_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$RECORDER_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$RECORDER_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo -e &amp;quot;set sv_allowDownload 0\n&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
		&lt;br /&gt;
	echo &amp;quot;set ettv_delay 1&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord 1&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves 0&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo -e &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS\n&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$RECORDER_BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;recorder.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $RECORDER_CFG&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_slave_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/slave.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	SLAVE_CFG=&amp;quot;$SLAVE_BASEPATH/etmain/slave.cfg&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;// config generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_maxclients $SLAVE_SLOTS&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $SLAVE_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$SLAVE_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$SLAVE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$SLAVE_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$SLAVE_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_delay 0&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord 0&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$SLAVE_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$SLAVE_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo -e &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS\n&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
		&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$SLAVE_BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;demo demo0000&amp;quot; &amp;gt;&amp;gt; $SLAVE_CFG&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Since we want to run multiple casts in parallel we launch the same&lt;br /&gt;
	# binary twice or more. pidof then doesn&#039;t work so we have to recreate&lt;br /&gt;
	# the human behaviour of looking for the PID.&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|grep -v grep|awk &#039;{ print $2 }&#039;`&lt;br /&gt;
	SLAVE_PID=`ps aux|grep &amp;quot;+set net_port $SLAVE_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|grep -v grep|awk &#039;{ print $2 }&#039;`&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_recorder_config&lt;br /&gt;
		create_slave_config&lt;br /&gt;
		broadcast_start&lt;br /&gt;
    		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	sim)&lt;br /&gt;
		create_recorder_config&lt;br /&gt;
		create_slave_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing configs were generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $RECORDER_CFG | more&lt;br /&gt;
		cat $SLAVE_CFG | more&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you do not want to delete in there, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ettv clean-up script                      #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(\&lt;br /&gt;
&amp;quot;description.txt&amp;quot; \&lt;br /&gt;
&amp;quot;hunkusage.dat&amp;quot; \&lt;br /&gt;
&amp;quot;mp_bin.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak0.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak1.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;et_ice.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;braundorf_b4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;supplydepot2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_goldrush_te.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_oasis_b3.pk3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
ETPRO_FILES=(\&lt;br /&gt;
&amp;quot;etpro-3_2_4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;etpro_cheats.dat&amp;quot; \&lt;br /&gt;
&amp;quot;qagame.mp.i386.so&amp;quot; \&lt;br /&gt;
&amp;quot;tvgame.mp.i386.so&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	hub)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $1 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {hub|slave}\n&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Switching beta&#039;s script ===&lt;br /&gt;
&lt;br /&gt;
This script allows you to quickly switch between the different beta&#039;s Bani has released. Just save it as &amp;lt;code&amp;gt;switchbeta.sh&amp;lt;/code&amp;gt; and adapt the directory fields to your setup. Usage example: &amp;lt;code&amp;gt;./switchbeta.sh 9 hub&amp;lt;/code&amp;gt; switches the hub to beta 9. &amp;lt;code&amp;gt;./switchbeta.sh 4 all&amp;lt;/code&amp;gt; switches hub &amp;amp; slave (or others you can define of course) back to beta 4.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  switching ettv betas script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script allows you to easily switch ETTV beta versions.   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Just put the ettv-beta[x].zip files in directory $REPODIR,    #&lt;br /&gt;
# adapt settings for hub &amp;amp; slave and start switching!           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Paths &amp;amp; files&lt;br /&gt;
#&lt;br /&gt;
REPODIR=&amp;quot;/srv/et&amp;quot;			# Where the ettv-betaX.zip files reside&lt;br /&gt;
HUB_DIR=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
SLAVE_DIR=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Argument check&lt;br /&gt;
#&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
ARGS=2&lt;br /&gt;
E_BADARGS=65&lt;br /&gt;
&lt;br /&gt;
if [ $# -lt &amp;quot;$ARGS&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: missing arguments&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|broadcast|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
FILENAME=&amp;quot;ettv-beta$1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$REPODIR/$FILENAME&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: beta version $1 is not present in $REPODIR.&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $2 in&lt;br /&gt;
	hub)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$HUB_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$SLAVE_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	all)&lt;br /&gt;
		$0 $1 hub&lt;br /&gt;
		$0 $1 slave&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $2 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
		exit $E_BADARGS&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 01:46, 3 January 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=2093</id>
		<title>WolfWiki:Community Portal</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=2093"/>
		<updated>2006-03-07T22:31:40Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* News Sites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== News Sites ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.et-center.com/ ET-Center]&lt;br /&gt;
* [http://www.xfire.be/ Xfire.be]&lt;br /&gt;
* [http://www.gamestv.org/ GamesTV.org]&lt;br /&gt;
* [http://www.swertcw.com/ sweRTCW]&lt;br /&gt;
* [http://www.planetwolfenstein.com/ Planet Wolfenstein]&lt;br /&gt;
* [http://www.etnation.co.uk/ ETNation.co.uk]&lt;br /&gt;
* [http://www.splashdamage.com/ SplashDamage.com]&lt;br /&gt;
* [http://www.planetwolfenstein.de/ PlanetWolfenstein.de]&lt;br /&gt;
* [http://www.rtcw.co.uk/ rtcw.co.uk]&lt;br /&gt;
* [http://velocity.lunarpages.com/index.html Unofficial Enemy Territory Strategy Guide]&lt;br /&gt;
* [http://www.planetwolfenstein.com/4newbies/ RTCW 4 Newbies]&lt;br /&gt;
* [http://www.enemy-territory.com Enemy Territory Resource Site]&lt;br /&gt;
* [http://www.geheimgemein.de/kallisti/ Kallisti.et Enemy Territory Fun Community]&lt;br /&gt;
* [http://www.et-scene.de/news.php ET-Scene.de (German)]&lt;br /&gt;
&lt;br /&gt;
== Leagues / Competitions ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.clanbase.com/ Clanbase]&lt;br /&gt;
* [http://www.teamwarfare.com/ TeamWarfare League]&lt;br /&gt;
* [http://www.sta-league.org/ Stronger Than All]&lt;br /&gt;
* [http://www.et-cup.net/ ET-Cup]&lt;br /&gt;
* [http://www.warleagues.com/ Warleagues]&lt;br /&gt;
* [http://www.frenchy-cup.com/ Frenchy-Cup european]&lt;br /&gt;
* [http://et-gather.be/ #et.gather Fast Gaming Cup]&lt;br /&gt;
&lt;br /&gt;
== Mods ==&lt;br /&gt;
&lt;br /&gt;
* [http://stealthy.foolishgames.net/ FalckonET]&lt;br /&gt;
* [http://www.truecombat.com/intro.php TC:Elite]&lt;br /&gt;
* [http://www.omni-bot.com/ Omni-Bot]&lt;br /&gt;
* [http://www.priceofpeace.net/ The Price of Peace]&lt;br /&gt;
* [http://www.etpub.org/news.php ETPub]&lt;br /&gt;
* [http://jaymod.clanfu.org/ Jaymod]&lt;br /&gt;
* [http://www.splashdamage.com/index.php?name=pnPHPbb2&amp;amp;file=viewtopic&amp;amp;t=7522 ET-Mod-Project-List]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=2092</id>
		<title>WolfWiki:Community Portal</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=2092"/>
		<updated>2006-03-07T22:30:05Z</updated>

		<summary type="html">&lt;p&gt;Deej: Fast gaming Cup added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== News Sites ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.et-center.com/ ET-Center]&lt;br /&gt;
* [http://www.xfire.be/ Xfire.be]&lt;br /&gt;
* [http://www.gamestv.org/ GamesTV.org]&lt;br /&gt;
* [http://www.swertcw.com/ sweRTCW]&lt;br /&gt;
* [http://www.planetwolfenstein.com/ Planet Wolfenstein]&lt;br /&gt;
* [http://www.etnation.co.uk/ ETNation.co.uk]&lt;br /&gt;
* [http://www.splashdamage.com/ SplashDamage.com]&lt;br /&gt;
* [http://www.planetwolfenstein.de/ PlanetWolfenstein.de]&lt;br /&gt;
* [http://www.rtcw.co.uk/ rtcw.co.uk]&lt;br /&gt;
* [http://velocity.lunarpages.com/index.html Unofficial Enemy Territory Strategy Guide]&lt;br /&gt;
* [http://www.planetwolfenstein.com/4newbies/ RTCW 4 Newbies]&lt;br /&gt;
* [http://www.enemy-territory.com Enemy Territory Resource Site]&lt;br /&gt;
* [http://www.geheimgemein.de/kallisti/ Kallisti.et Enemy Territory Fun Community]&lt;br /&gt;
&lt;br /&gt;
== Leagues / Competitions ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.clanbase.com/ Clanbase]&lt;br /&gt;
* [http://www.teamwarfare.com/ TeamWarfare League]&lt;br /&gt;
* [http://www.sta-league.org/ Stronger Than All]&lt;br /&gt;
* [http://www.et-cup.net/ ET-Cup]&lt;br /&gt;
* [http://www.warleagues.com/ Warleagues]&lt;br /&gt;
* [http://www.frenchy-cup.com/ Frenchy-Cup european]&lt;br /&gt;
* [http://et-gather.be/ #et.gather Fast Gaming Cup]&lt;br /&gt;
&lt;br /&gt;
== Mods ==&lt;br /&gt;
&lt;br /&gt;
* [http://stealthy.foolishgames.net/ FalckonET]&lt;br /&gt;
* [http://www.truecombat.com/intro.php TC:Elite]&lt;br /&gt;
* [http://www.omni-bot.com/ Omni-Bot]&lt;br /&gt;
* [http://www.priceofpeace.net/ The Price of Peace]&lt;br /&gt;
* [http://www.etpub.org/news.php ETPub]&lt;br /&gt;
* [http://jaymod.clanfu.org/ Jaymod]&lt;br /&gt;
* [http://www.splashdamage.com/index.php?name=pnPHPbb2&amp;amp;file=viewtopic&amp;amp;t=7522 ET-Mod-Project-List]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=2091</id>
		<title>WolfWiki:Community Portal</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=2091"/>
		<updated>2006-03-07T21:27:17Z</updated>

		<summary type="html">&lt;p&gt;Deej: Added Kallisti.et&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== News Sites ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.et-center.com/ ET-Center]&lt;br /&gt;
* [http://www.xfire.be/ Xfire.be]&lt;br /&gt;
* [http://www.gamestv.org/ GamesTV.org]&lt;br /&gt;
* [http://www.swertcw.com/ sweRTCW]&lt;br /&gt;
* [http://www.planetwolfenstein.com/ Planet Wolfenstein]&lt;br /&gt;
* [http://www.etnation.co.uk/ ETNation.co.uk]&lt;br /&gt;
* [http://www.splashdamage.com/ SplashDamage.com]&lt;br /&gt;
* [http://www.planetwolfenstein.de/ PlanetWolfenstein.de]&lt;br /&gt;
* [http://www.rtcw.co.uk/ rtcw.co.uk]&lt;br /&gt;
* [http://velocity.lunarpages.com/index.html Unofficial Enemy Territory Strategy Guide]&lt;br /&gt;
* [http://www.planetwolfenstein.com/4newbies/ RTCW 4 Newbies]&lt;br /&gt;
* [http://www.enemy-territory.com Enemy Territory Resource Site]&lt;br /&gt;
* [http://www.geheimgemein.de/kallisti/ Kallisti.et Enemy Territory Fun Community]&lt;br /&gt;
&lt;br /&gt;
== Leagues / Competitions ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.clanbase.com/ Clanbase]&lt;br /&gt;
* [http://www.teamwarfare.com/ TeamWarfare League]&lt;br /&gt;
* [http://www.sta-league.org/ Stronger Than All]&lt;br /&gt;
* [http://www.et-cup.net/ ET-Cup]&lt;br /&gt;
* [http://www.warleagues.com/ Warleagues]&lt;br /&gt;
* [http://www.frenchy-cup.com/ Frenchy-Cup european]&lt;br /&gt;
&lt;br /&gt;
== Mods ==&lt;br /&gt;
&lt;br /&gt;
* [http://stealthy.foolishgames.net/ FalckonET]&lt;br /&gt;
* [http://www.truecombat.com/intro.php TC:Elite]&lt;br /&gt;
* [http://www.omni-bot.com/ Omni-Bot]&lt;br /&gt;
* [http://www.priceofpeace.net/ The Price of Peace]&lt;br /&gt;
* [http://www.etpub.org/news.php ETPub]&lt;br /&gt;
* [http://jaymod.clanfu.org/ Jaymod]&lt;br /&gt;
* [http://www.splashdamage.com/index.php?name=pnPHPbb2&amp;amp;file=viewtopic&amp;amp;t=7522 ET-Mod-Project-List]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=2071</id>
		<title>ETTV:Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=2071"/>
		<updated>2006-02-07T16:11:00Z</updated>

		<summary type="html">&lt;p&gt;Deej: ettv flags is default 3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;dot_graph&amp;gt;&lt;br /&gt;
digraph ettv {&lt;br /&gt;
master -&amp;gt; slave1&lt;br /&gt;
master -&amp;gt; slave2&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;client1..&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;..client50&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;client51..&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;..client100&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;chained_slave1&amp;quot;&lt;br /&gt;
chained_slave1 -&amp;gt; &amp;quot;client101&amp;quot;&lt;br /&gt;
chained_slave1 -&amp;gt; &amp;quot;...client150&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dot_graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Master&amp;quot; (gameserver)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Start your gameserver as normal, but run ettv.x86 instead of etded.x86.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039; (default 0, no slave connections allowed)&lt;br /&gt;
:Number of ettv slaves allowed to connect.&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; Slave slots are always reserved, like private slots.&lt;br /&gt;
&#039;&#039;&#039;ettv_password&#039;&#039;&#039; (default &amp;quot;&amp;quot;, no slave connections allowed) &lt;br /&gt;
:Password for ettv slaves.&lt;br /&gt;
:Must be set, or no slaves will be able to connect!&lt;br /&gt;
&#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039; (default 3)&lt;br /&gt;
:1 = prevent slaves from being callvote kicked&lt;br /&gt;
:2 = grant shoutcaster status to slaves&lt;br /&gt;
:values can be added together, eg 3 for both features.&lt;br /&gt;
&lt;br /&gt;
===Playing on the master===&lt;br /&gt;
Players may now connect to your gameserver as normal.&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Slave&amp;quot; (broadcast server)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Copy tvgame.mp.i386.so to the same directory as your etpro/qagame.mp.i386.so is located.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&#039;&#039;&#039;sv_maxclients&#039;&#039;&#039;&lt;br /&gt;
:Number of spectator clients to allow. This number is only limited by available cpu and memory.&lt;br /&gt;
:Some guidelines when provisioning a broadcast server:&lt;br /&gt;
:*100 spectator slots will require ~ 128mb ram. Use com_hunkmegs to set this.&lt;br /&gt;
:*100 spectator slots will require ~ 768kbyte/sec (6mbits), roughly 6kbyte/sec per client&lt;br /&gt;
:*100 spectator slots will take ~ 80% cpu of a Xeon 2.2ghz&lt;br /&gt;
:*Each slave will require ~20-40kbyte/sec from the master.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_clientname&#039;&#039;&#039; (default &amp;quot;ETTV&amp;quot;)&lt;br /&gt;
:Playername the slave will use when connecting to the master, eg &amp;quot;ETTV-xyz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_delay&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of seconds for slave to delay the master feed. Recording/playback chains should no longer be needed, and slaves should always maintain an exact delay from the master server. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: this should ONLY be set on the slave.&lt;br /&gt;
:&#039;&#039;note&#039;&#039;: only supported in ettv beta8 and later&lt;br /&gt;
&lt;br /&gt;
===Chat passwords===&lt;br /&gt;
In order to curb the rampant abuse of ettv chat, admins may set &amp;quot;chat passwords&amp;quot; on their servers. If enabled, viewers are not allowed to chat unless they have a password. You can define as many passwords as you like, so you can easily track down individual abusers and limit the damage of stolen passwords.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpasswords&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of chat passwords defined.&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpassword&#039;&#039;&#039;(1-99999)&lt;br /&gt;
:individual chat passwords.&lt;br /&gt;
&lt;br /&gt;
viewers use &amp;lt;tt&amp;gt;/chatpassword &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;password&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; to login.&lt;br /&gt;
&lt;br /&gt;
if logged in, ettv chats will be tagged with a number in parentheses identifying which chat password the viewer is using. &lt;br /&gt;
===Misc commands for viewers===&lt;br /&gt;
;For ettv beta 4 and above&lt;br /&gt;
* spectators may &amp;lt;tt&amp;gt;/ignore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/unignore&amp;lt;/tt&amp;gt; other spectators&lt;br /&gt;
* &amp;lt;i&amp;gt;semiadmin&amp;lt;/i&amp;gt; functionality now works for slaves&lt;br /&gt;
* rcon may now mute/unmute specs &lt;br /&gt;
&lt;br /&gt;
===Connect the slave===&lt;br /&gt;
Now start your slave server by running ettv.x86&lt;br /&gt;
&lt;br /&gt;
Tell the slave server to connect up to the master server:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv connect master.ip.address:port &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;ettv_password&amp;lt;/b&amp;gt;(required)&amp;lt;/i&amp;gt; &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;g_password&amp;lt;/b&amp;gt;(if the master has a g_password set)&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have configured everything correctly, the slave should connect to the master.&lt;br /&gt;
Clients should now be able to connect to the slave and spectate the game in progress.&lt;br /&gt;
&lt;br /&gt;
This is a &amp;quot;live broadcast&amp;quot; with no delay.&lt;br /&gt;
&lt;br /&gt;
===Disconnect the slave===&lt;br /&gt;
To tell the slave to disconnect from the master:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv disconnect&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Slave Chaining===&lt;br /&gt;
&lt;br /&gt;
==== What is chaining and why chain slaves? ====&lt;br /&gt;
&lt;br /&gt;
ETTV allows chaining slaves together. This very neat feature lets you connect one ETTV slave to another ETTV slave that is broadcasting a match instead of directly to the game server hosting the match. Apart from the &amp;quot;w00t this is very cool&amp;quot; factor, why is this feature so important for admins? Basicly, working in a chained model allows to broadcast a match to a large number of spectators without too much hastle and too many risks for the master server.&lt;br /&gt;
&lt;br /&gt;
Chaining was developped for a simple reason: if you take into account that one ETTV slave connects at an &#039;&#039;&#039;unlimited&#039;&#039;&#039; rate to a master, you really don&#039;t want to connect 15 or 20 slaves to a game server to broadcast let&#039;s say the &#039;&#039;Atlantic Battle&#039;&#039;. Chances are you will bring down the master game server and thus the game. Chaining slaves firmly alleviates the load on the master game server. 2 or 4 of these &#039;&#039;Hubs&#039;&#039; can do the job of delaying the signal and feeding it to other slaves.&lt;br /&gt;
&lt;br /&gt;
Other benefits might include better network performance. If you can choose to either connect your slave to the game server where your connection is not optimal or to a nearby slave who is on a better connection to the master, it might help the quality of your broadcast. Plus you don&#039;t need to record anything when connecting to a delayed slave.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your slave to allow connections from other slaves ====&lt;br /&gt;
&lt;br /&gt;
This part is actually pretty easy. You need to set up your slave as if you were setting up a master game server. This means that, next to the normal slave parameters, you have to set up the following:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039;: set this to at least 1&lt;br /&gt;
* &#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039;: set this to at least 1. Depending on how powerful your machine is you can set this number higher. Don&#039;t set it too high though, a slave still connects at an unlimited rate&lt;br /&gt;
* &#039;&#039;&#039;ettv_password&#039;&#039;&#039;: set to something else than &amp;quot;&amp;quot;. This password is needed by the slaves connecting to your slave (together with g_password of course)&lt;br /&gt;
&lt;br /&gt;
Other settings such as ettv_netblast, ettv_tv_iptos etc... can be set as well. You can even use autorecord if you wish, or just add an extra delay.&lt;br /&gt;
&lt;br /&gt;
==== Pitfalls ====&lt;br /&gt;
&lt;br /&gt;
There are however a few risks associated with slave chaining. One of the biggest issues is &#039;&#039;&#039;PK3 dependancies&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As you know, a slave needs to have at least all the PK3s of the server it connects too. But a slave can have more PK3s installed, as long as it has the ones on the server&#039;s pure list. This is what complicates things! The further you go down the &amp;quot;chain&amp;quot;, the more the chances exist of PK3 pollution, which makes the job of the last slave very hard. And the viewers connecting to that slave will not be very happy either.&lt;br /&gt;
&lt;br /&gt;
So for those of you venturing into chaining slaves here&#039;s a rule of thumb: &#039;&#039;&#039;always keep the installed PK3s to the bare minimum&#039;&#039;&#039;! Do not add stuff you do not need. If you want to know what PK3s you need and not need, connect your slave to the master or the hub, see which PK3s are on the pure list and rename or remove the PK3s that are not on the list. You will make your viewers and other admins connecting to your slave very happy.&lt;br /&gt;
&lt;br /&gt;
Another risk could be &#039;&#039;&#039;chained lag&#039;&#039;&#039;. If one of the slaves that is higher in the chain starts lagging, the consequenses for the slaves depending on it will be seen immedeatily. So if you offer to be one of the higher slaves in the chain, make sure your machine can handle it! An ETTV chain is much like the food chain ;-).&lt;br /&gt;
&lt;br /&gt;
==== Admin contributions ====&lt;br /&gt;
&lt;br /&gt;
If by now you feel like getting your hands dirty in ETTV chaining madness and you want to see some example of hubs, slaves, broadcasters and scripts to get it all working, you can already start by checking out [[User:Deej|deej&#039;s page]].&lt;br /&gt;
&lt;br /&gt;
==ETTV Demos==&lt;br /&gt;
ETTV can record and playback &#039;&#039;&#039;ETTV demos&#039;&#039;&#039;. ETTV demos have the extension .tv_84 (or .tv_83 for older versions) and are completely different from the .dm_84 demos recorded on clients. &lt;br /&gt;
&lt;br /&gt;
You may record the match in progress to a file, with the command:&lt;br /&gt;
:&amp;lt;tt&amp;gt;record &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
If you omit the demo name, ettv will start recording using a filename of demoXXXX where XXXX is the first available number starting from 0000.&lt;br /&gt;
&lt;br /&gt;
Demos will stop recording when a map changes.&lt;br /&gt;
&lt;br /&gt;
To stop recording a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;stoprecord&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To play back a recorded demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of an ettv slave:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv status&amp;lt;/tt&amp;gt;&lt;br /&gt;
This will tell you if the slave is connected to a master, or if it is currently playing back a demo.&lt;br /&gt;
&lt;br /&gt;
To fastforward a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;ff &amp;lt;i&amp;gt;&amp;lt;seconds&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
Eg &amp;lt;tt&amp;gt;ff 30&amp;lt;/tt&amp;gt; will fast foward 30 seconds. Fast forward stops at map restarts, so you can safely ff 999 to fast forward through a warmup. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: requires ettv beta 7 or later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Autorecording demos===&lt;br /&gt;
ettv is able to automatically continuously record demos, creating new demofiles when the map changes. To do this, set the cvar ettv_autorecord to 1. ettv will start recording demos with the name demoXXXX where XXXX is a number starting at 0000 and incrementing on each map change.&lt;br /&gt;
&lt;br /&gt;
Server admins may find it useful to use the demo recording feature of ettv to record matches, instead of requiring individual players to record them. An ettv demo records everything that happens on a server, including all player viewpoints.&lt;br /&gt;
&lt;br /&gt;
===How to create demo based delayed feeds===&lt;br /&gt;
Autorecording demos is the first half of the process for delayed feeds. Typically you would run a passworded slave server with the smallest number of sv_maxclients possible. No spectators should connect to this server. The only purpose of this slave is to connect up to the master and record the match to sequentially numbered demofiles.&lt;br /&gt;
&lt;br /&gt;
Now start up a slave, and tell it to broadcast the demo being recorded.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo demo0000&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wait approx. 60 seconds after the master begins recording before issuing this command to your slaves, then you have a 60 second delay on your broadcast.&lt;br /&gt;
&lt;br /&gt;
If you want slaves to automatically switch to the next demo when the end of the demo is reached (eg on a map change), you would set the cvar ettv_autoplay to 1. If a slave is playing demo0000 and it reaches the end, it will then try to play demo0001 and so on.&lt;br /&gt;
&lt;br /&gt;
Disadvantage of this method: It is not automated in ettv itself, though admins can script it.&lt;br /&gt;
Advantage of this method: You may run multiple broadcast servers from the same single demo stream.&lt;br /&gt;
&lt;br /&gt;
Automated delayed feeds are supported in ettv beta 8. See the above.&lt;br /&gt;
&lt;br /&gt;
===Playing back previously recorded ETTV demos===&lt;br /&gt;
This is essentially the same as delayed feeds above.&lt;br /&gt;
* Configure your server as described in [[ETTV:Server_Configuration#Installation_-_.22Slave.22_.28broadcast_server.29|Slave Installation]] section&lt;br /&gt;
* Obtain the &amp;lt;tt&amp;gt;.tv_*&amp;lt;/tt&amp;gt; demos and place them in &amp;lt;tt&amp;gt;&#039;&#039;fs_game&#039;&#039;/demos&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Start the ettv executable with pb disabled&lt;br /&gt;
* &amp;lt;tt&amp;gt;set ettv_autoplay 1&amp;lt;/tt&amp;gt; if you want to play back sequential demos named &amp;lt;tt&amp;gt;demo0000.tv_84&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;demo0001.tv_84&amp;lt;/tt&amp;gt; etc.&lt;br /&gt;
* &amp;lt;tt&amp;gt;demo &#039;&#039;&#039;&amp;lt;yourdemoname&amp;gt;&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* connect a client and enjoy the show!&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* The slave server must be running the same fs_game setting as the master server.&lt;br /&gt;
* The slave server must have a copy of every map pk3 the master server is using.&lt;br /&gt;
* If the master server loads a map the slave server doesn&#039;t have, the slave will get stuck.&lt;br /&gt;
* Spectators will be forced to download any custom pk3 you are using.&lt;br /&gt;
* It is a good idea to keep the master server pk3 list to a minimum.&lt;br /&gt;
* If you are using the autorecord/autoplay feature for running delayed feeds, you will usually want to make sure you clear out the demos directory first. Autorecording will start numbering demofiles using the first available number, so if you have old recorded demos then ettv might start recording from eg demo0017. If your scripts expect to start playback from demo0000 then you might end up broadcasting a game recorded at some earlier date...&lt;br /&gt;
* If the broadcaster constantly reloads on round starts etc, it&#039;s probably a problem with too many pk3s on the ettv servers.&lt;br /&gt;
&lt;br /&gt;
==Miscellaneous==&lt;br /&gt;
&lt;br /&gt;
Slaves may send chats to the master with the command msay&lt;br /&gt;
Slaves may list players on the master with the command players&lt;br /&gt;
&lt;br /&gt;
==Performance tuning==&lt;br /&gt;
&lt;br /&gt;
Spectator servers with large numbers of clients (eg &amp;gt;100) will push the OS very hard with huge amounts of UDP traffic. The default OS buffer settings for Linux are inadequate and can hurt performance, causing lag and/or disconnects.&lt;br /&gt;
&lt;br /&gt;
If you get messages like&lt;br /&gt;
:&amp;lt;tt&amp;gt;NET_SendPacket ERROR: No buffer space available to 192.168.120.142:27960&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you definitely need to increase your kernel network buffers.&lt;br /&gt;
&lt;br /&gt;
Large spectator servers should increase the kernel buffers.&lt;br /&gt;
&lt;br /&gt;
The following commands should be issued as root on linux:&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FreeBSD can try this:&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.recvspace=65535&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.maxdgram=57344&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w kern.ipc.maxsockbuf=8388608&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Network tuning cvars===&lt;br /&gt;
;The following are only available in ettv beta 7 and later.&lt;br /&gt;
By default, et uses small packets of 1400 bytes or less to send to clients. If messages need to be larger, they are &#039;fragmented&#039; and sent over several server frames. ettv slave messages tend to be large and often fragment. ettv normally tries to send slaves all fragments at once to avoid jittery playback, but some networks / OSes handle this badly. ettv beta 7 introduces new controls so admins can optimize ettv for their individual network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_netblast&#039;&#039;&#039; (default 1)&lt;br /&gt;
:by default, ettv tries to send all fragments at once. some networks may handle this badly. setting this to 0 disables. warning: setting this to 0 without increasing ettv_mtu will result in severely laggy slave playback.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_mtu&#039;&#039;&#039; (default 1400)&lt;br /&gt;
:; master only&lt;br /&gt;
:if your network / os supports it, you can set this to large values (eg 16000) to prevent message fragmentation and provide smoother ettv links. this cvar has no effect on normal ET clients. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: ettv_mtu must currently be set from commandline, it cannot be changed on the fly (yet).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_tv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:you can set the ip type of service field of ettv link packets. if your network/ISP supports it, you can use a value like 16 (&amp;quot;minimize delay&amp;quot;) to prioritize ettv link packets over others on the network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:same as ettv_tv_iptos, but affects packets for normal ET clients.&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=SendServerCommand&amp;diff=2068</id>
		<title>SendServerCommand</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=SendServerCommand&amp;diff=2068"/>
		<updated>2006-01-27T08:25:30Z</updated>

		<summary type="html">&lt;p&gt;Deej: typo corrected&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__&lt;br /&gt;
et.trap_SendServerCommand() is used to send a command from the server to one or more clients. The first argument is the slot number of the client the command will be sent to. If it&#039;s equal to -1, the command will be broadcast to all clients.&lt;br /&gt;
&lt;br /&gt;
The following commands can be issued with this function:&lt;br /&gt;
&lt;br /&gt;
==Printing==&lt;br /&gt;
===Print===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;print&#039;&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\n\&amp;quot;&amp;quot;&lt;br /&gt;
:&#039;&#039;&#039;print&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; to the client&#039;s console.&lt;br /&gt;
&lt;br /&gt;
===Center Print MoO=== &lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;cpm&#039;&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\n\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;cpm&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; to the client&#039;s annoucement area and console.&lt;br /&gt;
&lt;br /&gt;
===Center Print===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;cp&#039;&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\n\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;cp&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; to the center of the client&#039;s screen.&lt;br /&gt;
&lt;br /&gt;
===Banner Print===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;b&#039;&#039;&#039; &#039;&#039;locations&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\n\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;b&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; to the client&#039;s banner &#039;&#039;locations&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
:the &#039;&#039;locations&#039;&#039; can be a number from 0 to 248&lt;br /&gt;
:For compatibility, the old-style locations (from 0-4) are also supported.&amp;lt;br&amp;gt;&lt;br /&gt;
:8 - player chat area&amp;lt;br&amp;gt;                &lt;br /&gt;
:16 - left popup area (not recommended)&amp;lt;br&amp;gt;&lt;br /&gt;
:32 - centered above the chat area&amp;lt;br&amp;gt;&lt;br /&gt;
:64 - console only&amp;lt;br&amp;gt;&lt;br /&gt;
:128 - banner area (recommended)(top of screen)&lt;br /&gt;
&lt;br /&gt;
===Scores Print===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;sc&#039;&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\n\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;sc&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; to the client&#039;s console and writes it to the statsdump file.&lt;br /&gt;
&lt;br /&gt;
==Chatting==&lt;br /&gt;
===Chat===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;c&#039;&#039;&#039; &#039;&#039;ClientNum&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;c&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; as a global chat message on behalf of the client specified by &#039;&#039;ClientNum&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Team Chat===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;tc&#039;&#039;&#039; &#039;&#039;ClientNum&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\&amp;quot; &#039;&#039;X-Location&#039;&#039; &#039;&#039;Y-Location&#039;&#039; &#039;&#039;Z-Location&#039;&#039;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;tc&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; as a team chat message on behalf of the client specified by &#039;&#039;ClientNum&#039;&#039;,&amp;lt;br&amp;gt;&lt;br /&gt;
:the &#039;&#039;X,Y,Z-Location&#039;s&#039;&#039; are optional parematers that represent the client&#039;s location,&amp;lt;br&amp;gt;&lt;br /&gt;
:if the &#039;&#039;X,Y,Z-Location&#039;s&#039;&#039; are left out then the message will be printed without a location.&lt;br /&gt;
&lt;br /&gt;
===Fireteam Chat===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;bc&#039;&#039;&#039; &#039;&#039;ClientNum&#039;&#039; \&amp;quot;&#039;&#039;Message&#039;&#039;\&amp;quot; &#039;&#039;X-Location&#039;&#039; &#039;&#039;Y-Location&#039;&#039; &#039;&#039;Z-Location&#039;&#039;&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;bc&#039;&#039;&#039; prints &#039;&#039;Message&#039;&#039; as a fireteam chat message on behalf of the client specified by &#039;&#039;ClientNum&#039;&#039;,&amp;lt;br&amp;gt;&lt;br /&gt;
:the &#039;&#039;X,Y,Z-Location&#039;s&#039;&#039; are parematers that represent the client&#039;s location.&lt;br /&gt;
&lt;br /&gt;
==Voice Chat==&lt;br /&gt;
===Global Voice Chat===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;vchat&#039;&#039;&#039; &#039;&#039;VoiceOnly&#039;&#039; &#039;&#039;ClientNum&#039;&#039; 50 &#039;&#039;Vsay-String&#039;&#039; &#039;&#039;Vsay-Number&#039;&#039; \&amp;quot;&#039;&#039;Custom-Message&#039;&#039;\&amp;quot;&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;vchat&#039;&#039;&#039; sends a global voice chat &#039;&#039;Vsay-String&#039;&#039; on behalf of the client specified by &#039;&#039;ClientNum&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;Vsay-Number&#039;&#039; is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay &amp;lt;&#039;&#039;Vsay-Number&#039;&#039;&amp;gt; &amp;lt;&#039;&#039;Vsay-String&#039;&#039;&amp;gt;),&amp;lt;br&amp;gt; &#039;&#039;Vsay-Number&#039;&#039; represents the vsay number of Vsay as listed in the .voice files.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;Custom-Message&#039;&#039; is by default \&amp;quot;\&amp;quot; (empty), otherwise it&#039;s the message that gets printed in the chat area.&lt;br /&gt;
:if &#039;&#039;VoiceOnly&#039;&#039; is 0 it will print a chat message on behalf of &#039;&#039;ClientNum&#039;&#039; contaning the message&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;VoiceOnly&#039;&#039; is 1 it will only do the sound but not the message&lt;br /&gt;
&lt;br /&gt;
===Team Voice Chat===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;vtchat&#039;&#039;&#039; &#039;&#039;VoiceOnly&#039;&#039; &#039;&#039;ClientNum&#039;&#039; 50 &#039;&#039;Vsay-String&#039;&#039; &#039;&#039;Vsay-Number&#039;&#039; &#039;&#039;X-Location&#039;&#039; &#039;&#039;Y-Location&#039;&#039; &#039;&#039;Z-Location&#039;&#039; \&amp;quot;&#039;&#039;Custom-Message&#039;&#039;\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;vchat&#039;&#039;&#039; sends a team voice chat &#039;&#039;Vsay-String&#039;&#039; a on behalf of client &#039;&#039;ClienNtum&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;Vsay-Number&#039;&#039; is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay &amp;lt;&#039;&#039;Vsay-Number&#039;&#039;&amp;gt; &amp;lt;&#039;&#039;Vsay-String&#039;&#039;&amp;gt;),&amp;lt;br&amp;gt; &#039;&#039;Vsay-Number&#039;&#039; represents the vsay number of Vsay as listed in the .voice files.&amp;lt;br&amp;gt;&lt;br /&gt;
:the &#039;&#039;X,Y,Z-Location&#039;s&#039;&#039; parematers the represent the clients location.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;Custom-Message&#039;&#039; is by default \&amp;quot;\&amp;quot; (empty), otherwise it&#039;s the message that gets printed in the chat area.&lt;br /&gt;
:if &#039;&#039;VoiceOnly&#039;&#039; is 0 it will print a chat message on behalf of &#039;&#039;ClientNum&#039;&#039; contaning the message&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;VoiceOnly&#039;&#039; is 1 it will only do the sound but not the message&lt;br /&gt;
&lt;br /&gt;
===Fireteam Voice Chat===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;vtchat&#039;&#039;&#039; &#039;&#039;VoiceOnly&#039;&#039; &#039;&#039;ClientNum&#039;&#039; 50 &#039;&#039;Fireteam-String&#039;&#039; &#039;&#039;Vsay-Number&#039;&#039; &#039;&#039;X-Location&#039;&#039; &#039;&#039;Y-Location&#039;&#039; &#039;&#039;Z-Location&#039;&#039; \&amp;quot;&#039;&#039;Custom-Message&#039;&#039;\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;vchat&#039;&#039;&#039; will team voice chat &#039;&#039;Vsay-String&#039;&#039; on behalf of client &#039;&#039;ClienNum&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;Vsay-Number&#039;&#039; is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay &amp;lt;&#039;&#039;Vsay-Number&#039;&#039;&amp;gt; &amp;lt;&#039;&#039;Vsay-String&#039;&#039;&amp;gt;),&amp;lt;br&amp;gt; &#039;&#039;Vsay-Number&#039;&#039; represents the vsay number of Vsay as listed in the .voice files.&amp;lt;br&amp;gt;&lt;br /&gt;
:the &#039;&#039;X,Y,Z-Location&#039;s&#039;&#039; parematers the represent the clients location.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;Custom-Message&#039;&#039; is by default \&amp;quot;\&amp;quot; (empty), otherwise it&#039;s the message that gets printed in the chat area.&lt;br /&gt;
:if &#039;&#039;VoiceOnly&#039;&#039; is 0 it will print a chat message on behalf of &#039;&#039;ClientNum&#039;&#039; contaning the message&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;VoiceOnly&#039;&#039; is 1 it will only do the sound but not the message&lt;br /&gt;
&lt;br /&gt;
==Fireteam==&lt;br /&gt;
===Application===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;application&#039;&#039;&#039; &#039;&#039;Number&#039;&#039;&amp;quot;&lt;br /&gt;
:&#039;&#039;&#039;application&#039;&#039;&#039; shows a fireteam invation message to the client.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; &amp;gt; -1 - the &amp;quot;accept ... application to join your fireteam&amp;quot; message shows up. In this case &#039;&#039;Number&#039;&#039; is the ClientNum of the applying client.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -1 - the &amp;quot;your aplication has been submitted&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -2 - the &amp;quot;your aplication failed&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -3 - the &amp;quot;your aplication has been approved&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -4 - the &amp;quot;your aplication reply has been sent&amp;quot; message shows up.&lt;br /&gt;
&lt;br /&gt;
===Proposition===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;proposition&#039;&#039;&#039; &#039;&#039;Number&#039;&#039; &#039;&#039;Number2&#039;&#039;&amp;quot;&lt;br /&gt;
:&#039;&#039;&#039;proposition&#039;&#039;&#039; shows a fireteam proposition message to the client.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; &amp;gt; -1 - the &amp;quot;accept ... proposition to invite ... to your fireteam&amp;quot; message shows up. In this case &#039;&#039;Number&#039;&#039; is the ClientNum of the proposed client, and &#039;&#039;Number2&#039;&#039; is the ClientNum of the proposing player.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -1 - the &amp;quot;your proposition has been submitted&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -2 - the &amp;quot;your proposition was rejected&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -3 - the &amp;quot;your proposition was accepted&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -4 - the &amp;quot;your proposition reply has been sent&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;Number2&#039;&#039; is an optional paramater only used when &#039;&#039;Number&#039;&#039; &amp;gt; -1.&lt;br /&gt;
&lt;br /&gt;
===Invitation===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;invitation&#039;&#039;&#039; &#039;&#039;Number&#039;&#039;&amp;quot;&lt;br /&gt;
:&#039;&#039;&#039;invitation&#039;&#039;&#039; shows the fireteam invation message to the client.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; &amp;gt; -1 - the &amp;quot;accept .. invitation to join your fireteam&amp;quot; message shows up. In this case &#039;&#039;Number&#039;&#039; is the ClientNum of the applying client.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -1 - the &amp;quot;your invitation has been submitted&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -2 - the &amp;quot;your invitation rejected&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -3 - the &amp;quot;your invitation was accepted&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -4 - the &amp;quot;your invitation reply has been sent&amp;quot; message shows up.&lt;br /&gt;
&lt;br /&gt;
==Others== &lt;br /&gt;
===Complaining===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;complaint&#039;&#039;&#039; &#039;&#039;Number&#039;&#039;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;complaint&#039;&#039;&#039; shows the complaint vote message to the client.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; &amp;gt; 1 - the vote shows up. In this case &#039;&#039;Number&#039;&#039; is the ClientNum of the teamkilling player.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -1 - the &amp;quot;complaint filed&amp;quot; message shows up.&amp;lt;br&amp;gt;&lt;br /&gt;
:if &#039;&#039;Number&#039;&#039; == -2 - the &amp;quot;complaint dismissed&amp;quot; message shows up.&lt;br /&gt;
&lt;br /&gt;
===Spawning===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;setspawnpt&#039;&#039;&#039; &#039;&#039;Number&#039;&#039;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;setspawnpt&#039;&#039;&#039; sets the client game selected spawnpoint to number &#039;&#039;number&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===kicking===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;disconnect&#039;&#039;&#039; \&amp;quot;&#039;&#039;reason&#039;&#039;\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;disconnect&#039;&#039;&#039; will disconnect the client it has been send with a &amp;quot;Server disconnected&amp;quot; message&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;reason&#039;&#039; is an optialnal parameter to show a reason after &amp;quot;Server disconnected&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Configstrings===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;cs&#039;&#039;&#039; &#039;&#039;Number&#039;&#039; \&amp;quot;&#039;&#039;String&#039;&#039;\&amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
: &#039;&#039;&#039;cs&#039;&#039;&#039; will set the clients configstringnumber &#039;&#039;Number&#039;&#039; to the &#039;&#039;String&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Shaders===&lt;br /&gt;
* &amp;quot;&#039;&#039;&#039;remapShader&#039;&#039;&#039; \&amp;quot;&#039;&#039;OldShader&#039;&#039;\&amp;quot; \&amp;quot;&#039;&#039;NewShader&#039;&#039;\&amp;quot; &#039;&#039;0&#039;&#039;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
: &#039;&#039;&#039;remapShader&#039;&#039;&#039; remaps the &#039;&#039;OldShader&#039;&#039; whit &#039;&#039;NewShader&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
: &#039;&#039;0&#039;&#039; is the Timeoffset, i have no idea wut it means so better leave it 0&lt;br /&gt;
&lt;br /&gt;
[[Category:ETPro]]&lt;br /&gt;
[[Category:ETPro:Mods]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Server_Configuration&amp;diff=2062</id>
		<title>Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Server_Configuration&amp;diff=2062"/>
		<updated>2006-01-24T09:03:26Z</updated>

		<summary type="html">&lt;p&gt;Deej: etded is for the server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Installation==&lt;br /&gt;
File installation:&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;etpro&amp;lt;/tt&amp;gt; directory should be in the same directory as &amp;lt;tt&amp;gt;etmain&amp;lt;/tt&amp;gt;.  &amp;lt;i&amp;gt;Do &amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; extract the files to etmain&amp;lt;/i&amp;gt;&lt;br /&gt;
:Linux:&lt;br /&gt;
Unzip the server archive to &amp;lt;tt&amp;gt;enemy-territory/etpro/&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Windows:&lt;br /&gt;
Unzip the server archive to &amp;lt;tt&amp;gt;Wolfenstein - Enemy Territory\etpro&amp;lt;/tt&amp;gt;&lt;br /&gt;
Starting an ETPro server requires &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt; to be appended to the end of the command line.&lt;br /&gt;
:Linux example:&lt;br /&gt;
::&amp;lt;tt&amp;gt;  ./etded +set fs_game etpro&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Windows:&lt;br /&gt;
::&amp;lt;tt&amp;gt;  etded.exe +set fs_game etpro&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Windows Shortcut:&lt;br /&gt;
::Right click on the shortcut for Enemy Territory and select &amp;quot;Properties.&amp;quot; In the &amp;quot;Target&amp;quot; Box (Top text box) add &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt; to the end, after the quotes.&lt;br /&gt;
::&amp;lt;tt&amp;gt;  &amp;quot;C:\Program Files\Wolfenstein - Enemy Territory\et.exe&amp;quot; +set fs_game etpro&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: Starting from version ET 2.60, the Windows executables are et.exe for the game and etded.exe for the server. If you want to run a listen server on Windows start your game with et.exe, otherwise use etded.exe for a dedicated server.&lt;br /&gt;
&lt;br /&gt;
If you want to run 2.56 or earlier servers on Windows, you can only use et.exe and append &amp;lt;tt&amp;gt;+set dedicated 1&amp;lt;/tt&amp;gt; (or 2).&lt;br /&gt;
&lt;br /&gt;
==Warnings==&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;WARNING: Server improperly installed! Incorrect fs_game setting! Please notify administrator.&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:Incorrect &amp;lt;tt&amp;gt;+set fs_game&amp;lt;/tt&amp;gt; string.  Make sure it is set to &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;fs_game is write protected.&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:You must start your server via the command line (Or by changing the shortcut) with the &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt; command.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Client .pk3 missing!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:The PK3 file that is contained in the server install file is missing.  Download the [http://bani.anime.net/etpro/download.html server install] again and place the PK3 file in the server&#039;s ETPro directory.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Incorrect client .pk3 installed on server!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:The PK3 file mentioned above does not match the version of the server.  Download the PK3 (And possibly updated server) from the [http://bani.anime.net/etpro/download.html download page].&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Multiple client .pk3 versions installed on server!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:This means that the server has more than one ETPro client PK3.  Remove the older versions from the server&#039;s ETPro directory.&lt;br /&gt;
:This can also happen from having fs_game set twice in your shortcut or config.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Incorrect ET version!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:This happens when you are attempting to install ETPro on a non-patched ET server.  Download the [http://games.activision.com/games/wolfenstein patch] and try again.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Cvar dedicated is 0! Some features will break!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:ETPro is meant to be installed on a dedicated server.  Set the server to dedicated by using &amp;lt;tt&amp;gt;+set dedicated 2&amp;lt;/tt&amp;gt; in the command-line used to start the server.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;etpro_cheats.dat is corrupt or missing!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:The ETPro database file for positively identifying cheats has either been corrupted or does not exist on the server.  Download a recent version of [http://etpro.anime.net/etpro_cheats.dat the database].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Other Errors==&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Server sends users the ETPro PK3 file over and over.&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:If you are using download redirects, make sure that the download path is set correctly if changed between versions.  eg: If the old PK3 was in &amp;lt;tt&amp;gt;server/etpro2&amp;lt;/tt&amp;gt; and the new version is in &amp;lt;tt&amp;gt;server/etpro3&amp;lt;/tt&amp;gt; and the redirect path in the server configuration was not changed, it would send the old ETPro 2.x files; which not being what the server is using, it would cause the download to start again.&amp;lt;br&amp;gt;&lt;br /&gt;
:If you are redirecting to an http or ftp server, make sure the pk3 on the http/ftp server exactly matches the pk3 on the game server.&lt;br /&gt;
:Some http servers may incorrectly try to send pk3 files as text/plain, which will corrupt downloads. Make sure they are sent as application/octet-stream:&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;*WARNING*: PunkBuster Reports PB Server Running Old Version Cx.xxx&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Windows:&lt;br /&gt;
:Run &amp;lt;tt&amp;gt;\Wolfenstein - Enemy territory\pb\pbweb.exe&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Linux:&lt;br /&gt;
:Run &amp;lt;tt&amp;gt;/path_to_et_server/pb/pbweb.x86&amp;lt;/tt&amp;gt; (first chmod +x pbweb.x86)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configuration:==&lt;br /&gt;
&amp;lt;i&amp;gt;[http://bani.anime.net/banimod/forums/viewforum.php?f=13 Server Admin Forums]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://rtcw.jolt.co.uk/content/enemy_territory/server_guide/index.html DG&#039;s Advanced Server Guide]&lt;br /&gt;
&lt;br /&gt;
[http://et.d1p.de/etadmin_mod/wiki/index.php/User:Phats#Advanced_Campaign_Structure_-_Using_etadmin_mod____.28Prototype.29  Advanced Campaign Structure - Using etadmin_mod (Prototype)]&lt;br /&gt;
&lt;br /&gt;
[[Category:ETPro]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=TrickJumpLines&amp;diff=2061</id>
		<title>TrickJumpLines</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=TrickJumpLines&amp;diff=2061"/>
		<updated>2006-01-24T09:00:29Z</updated>

		<summary type="html">&lt;p&gt;Deej: spelling error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trickjumplines or tjl&#039;s in short are lines that trace the path of your movement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.twwwo.be/etpro/docs/tjl/tjl_inaction.jpg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use them in two ways: the first one is the easy to use one (with a built-in menu), the second one is the console-way but gives you more possibilities. Important: cheats must be enabled before you can use this tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Menu Way===&lt;br /&gt;
&lt;br /&gt;
To use the menu you have to bind the console command to a key.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039; &#039;&#039;&#039;/bind tjl_menu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.twwwo.be/etpro/docs/tjl/tjl_menu.jpg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see there are five menu items:&lt;br /&gt;
&lt;br /&gt;
    * Record: this starts recording your movements.&lt;br /&gt;
    * Stoprecord: this stops your movement recoring.&lt;br /&gt;
    * Quicksave: if you want to save your impressive jump into a file so you can share it with your friends, use this option.&lt;br /&gt;
    * Quickload: this loads the last Quicksaved trickjumpline, if you want to load other tjl files you have to use the console.&lt;br /&gt;
    * Draw slot: this toggles the drawing of the current slot.&lt;br /&gt;
&lt;br /&gt;
All these actions are executed on the slotnumber set in the cvar &#039;&#039;&#039;*b_tjl_quickslot*&#039;&#039;&#039;, you can use a maximum of 10 slots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Console Way===&lt;br /&gt;
&lt;br /&gt;
Open the console and type the commando &#039;&#039;&#039;/tjl_info&#039;&#039;&#039;, this will give you detailed information about all the tjl cmd&#039;s and cvars.&lt;br /&gt;
&lt;br /&gt;
    * tjl_startrecord &amp;lt;clientnum&amp;gt; &amp;lt;slot&amp;gt; OR &amp;lt;slot&amp;gt; | no parameters records your own movements: starts recording your movements&lt;br /&gt;
    * tjl_stoprecord : stops recording your movements&lt;br /&gt;
    * tjl_drawslot &amp;lt;slot&amp;gt; OR &amp;lt;slot&amp;gt; &amp;lt;color&amp;gt; : draws a given slot (toggle) b_tjl_color must be set to -1 in order to use this option&lt;br /&gt;
    * tjl_save &amp;lt;filename&amp;gt; &amp;lt;slot&amp;gt; : saves the current slot into a file&lt;br /&gt;
    * tjl_load &amp;lt;filename&amp;gt; &amp;lt;slot&amp;gt; : loads the current file into a slot&lt;br /&gt;
    * tjl_menu : a nice menu to easy use the tjl tools&lt;br /&gt;
    * b_tjl_draw &amp;lt;1/0&amp;gt; : draws a recorded movement&lt;br /&gt;
    * b_tjl_stoponnomove &amp;lt;1/0&amp;gt; : stops recording when not moving&lt;br /&gt;
    * b_tjl_color &amp;lt;hex value&amp;gt; : default linecolor&lt;br /&gt;
    * b_tjl_showmaxspeed &amp;lt;1/0&amp;gt;: shows the players max speed at that point on the line&lt;br /&gt;
    * b_tjl_stepsize &amp;lt;number&amp;gt; : the distance between two points on the line, if you want to draw much long lines, use a big stepsize&lt;br /&gt;
    * b_tjl_quickslot &amp;lt;number&amp;gt; : this slotnumber is used when u use the tjl_menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Other benefits of the trickjumplines===&lt;br /&gt;
&lt;br /&gt;
You can use the trickjumplines to teach your tactics to your teammates, by showing them the places where they have to move to.&lt;br /&gt;
Or custommapmakers can include some tjl&#039;s into their pk3&#039;s so people can use them to learn the shortest path to the objectives.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.twwwo.be/etpro/docs/tjl/tjl_tactics.jpg&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2034</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2034"/>
		<updated>2006-01-06T09:38:13Z</updated>

		<summary type="html">&lt;p&gt;Deej: parameter correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, and as from ETTV b9 the slaves are in fact not limited at all by the original ET netcode, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub. The script generates the server.cfg dynamically every time you start it. If you just want to generate server.cfg do &amp;lt;code&amp;gt;./hub.sh sim&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                    ettv delayed hub script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`		# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;	# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;			# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
HUB_IP=&amp;quot;$PERONI_IP&amp;quot;			# This host is Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;30000&amp;quot;			# Port of public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;	# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
HUB_DELAY=&amp;quot;1&amp;quot;				# Delay between live match &amp;amp; hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;				# 1 ETTV slave connects at an UNLIMITED rate!&lt;br /&gt;
HUB_PRIVATE_SLOTS=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;				# Record the game?&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;				# Slaves don&#039;t download from the hub&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are high enough!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $HUB_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $HUB_SLAVES \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $HUB_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -n $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $HUB_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$HUB_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$HUB_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$HUB_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$HUB_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $HUB_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$HUB_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$HUB_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects a delayed or undelayed slave to a Hub or directly to a gameserver. The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Use &amp;lt;code&amp;gt;./slave.sh sim&amp;lt;/code&amp;gt; to only create etmain/server.cfg. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ETTV slave script                         #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to an ETTV HUB or directly to a game server.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? deej@fragland.org or go to #gamestv.org            #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
# &lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# HUB / Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;				# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
SLAVE_IP=&amp;quot;$PERONI_IP&amp;quot;				# This host is Peroni&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;				# port of public broadcaster&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;	# shows up on the Hub&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;20&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;5&amp;quot;				# Allow chaining?&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;					# 1 = record game, 0 = don&#039;t&lt;br /&gt;
SLAVE_DELAY=&amp;quot;60&amp;quot;				# Time in seconds&lt;br /&gt;
&lt;br /&gt;
REDIRECT=&amp;quot;Server is full&amp;quot;			# Message displayed when server is full&lt;br /&gt;
#REDIRECT=&amp;quot;ET://ettv2.fragland.org:27960&amp;quot;	# Allows redirecting to other ettv&#039;s&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Downloading&lt;br /&gt;
#&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;					# Can clients download stuff?&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;		# Path to ettv.x86&lt;br /&gt;
						# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are ok!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set com_hunkMegs 256 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	#&lt;br /&gt;
	# Start the slave&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	if [ $SLAVE_ETTV_SLAVES != 0 ]&lt;br /&gt;
		then&lt;br /&gt;
			echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
			echo -e &amp;quot;tv connect $SLAVE_IP:$SLAVE_PORT $SLAVE_ETTV_PASS $SLAVE_PASS\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $SLAVE_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$SLAVE_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$SLAVE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$SLAVE_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$SLAVE_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $SLAVE_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$SLAVE_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$SLAVE_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		$0 start&lt;br /&gt;
		;;	&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you do not want to delete in there, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ettv clean-up script                      #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(\&lt;br /&gt;
&amp;quot;description.txt&amp;quot; \&lt;br /&gt;
&amp;quot;hunkusage.dat&amp;quot; \&lt;br /&gt;
&amp;quot;mp_bin.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak0.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak1.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;et_ice.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;braundorf_b4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;supplydepot2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_goldrush_te.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_oasis_b3.pk3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
ETPRO_FILES=(\&lt;br /&gt;
&amp;quot;etpro-3_2_4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;etpro_cheats.dat&amp;quot; \&lt;br /&gt;
&amp;quot;qagame.mp.i386.so&amp;quot; \&lt;br /&gt;
&amp;quot;tvgame.mp.i386.so&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	hub)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $1 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {hub|slave}\n&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Switching beta&#039;s script ===&lt;br /&gt;
&lt;br /&gt;
This script allows you to quickly switch between the different beta&#039;s Bani has released. Just save it as &amp;lt;code&amp;gt;switchbeta.sh&amp;lt;/code&amp;gt; and adapt the directory fields to your setup. Usage example: &amp;lt;code&amp;gt;./switchbeta.sh 9 hub&amp;lt;/code&amp;gt; switches the hub to beta 9. &amp;lt;code&amp;gt;./switchbeta.sh 4 all&amp;lt;/code&amp;gt; switches hub &amp;amp; slave (or others you can define of course) back to beta 4.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  switching ettv betas script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script allows you to easily switch ETTV beta versions.   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Just put the ettv-beta[x].zip files in directory $REPODIR,    #&lt;br /&gt;
# adapt settings for hub &amp;amp; slave and start switching!           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Paths &amp;amp; files&lt;br /&gt;
#&lt;br /&gt;
REPODIR=&amp;quot;/srv/et&amp;quot;			# Where the ettv-betaX.zip files reside&lt;br /&gt;
HUB_DIR=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
SLAVE_DIR=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Argument check&lt;br /&gt;
#&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
ARGS=2&lt;br /&gt;
E_BADARGS=65&lt;br /&gt;
&lt;br /&gt;
if [ $# -lt &amp;quot;$ARGS&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: missing arguments&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|broadcast|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
FILENAME=&amp;quot;ettv-beta$1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$REPODIR/$FILENAME&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: beta version $1 is not present in $REPODIR.&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $2 in&lt;br /&gt;
	hub)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$HUB_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$SLAVE_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	all)&lt;br /&gt;
		$0 $1 hub&lt;br /&gt;
		$0 $1 slave&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $2 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
		exit $E_BADARGS&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 01:46, 3 January 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Talk:Current_events&amp;diff=2031</id>
		<title>Talk:Current events</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Talk:Current_events&amp;diff=2031"/>
		<updated>2006-01-05T16:02:30Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Phase IX should be moved forward IMO -- [[User:Deej|deej]] 08:02, 5 January 2006 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2028</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2028"/>
		<updated>2006-01-03T09:52:38Z</updated>

		<summary type="html">&lt;p&gt;Deej: goddamn typos! wake up!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, and as from ETTV b9 the slaves are in fact not limited at all by the original ET netcode, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub. The script generates the server.cfg dynamically every time you start it. If you just want to generate server.cfg do &amp;lt;code&amp;gt;./hub.sh sim&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                    ettv delayed hub script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`		# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;	# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;			# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
HUB_IP=&amp;quot;$PERONI_IP&amp;quot;			# This host is Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;30000&amp;quot;			# Port of public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;	# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
HUB_DELAY=&amp;quot;1&amp;quot;				# Delay between live match &amp;amp; hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;				# 1 ETTV slave connects at an UNLIMITED rate!&lt;br /&gt;
HUB_PRIVATE_SLOTS=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;				# Record the game?&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;				# Slaves don&#039;t download from the hub&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are high enough!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $HUB_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $HUB_SLAVES \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $HUB_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -n $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $HUB_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$HUB_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$HUB_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$HUB_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$HUB_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $HUB_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$HUB_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$HUB_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects a delayed or undelayed slave to a Hub or directly to a gameserver. The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Use &amp;lt;code&amp;gt;./slave.sh sim&amp;lt;/code&amp;gt; to only create etmain/server.cfg. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ETTV slave script                         #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to an ETTV HUB or directly to a game server.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? deej@fragland.org or go to #gamestv.org            #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
# &lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# HUB / Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;				# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
SLAVE_IP=&amp;quot;$PERONI_IP&amp;quot;				# This host is Peroni&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;				# port of public broadcaster&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;	# shows up on the Hub&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;20&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;5&amp;quot;				# Allow chaining?&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;					# 1 = record game, 0 = don&#039;t&lt;br /&gt;
SLAVE_DELAY=&amp;quot;60&amp;quot;				# Time in seconds&lt;br /&gt;
&lt;br /&gt;
REDIRECT=&amp;quot;Server is full&amp;quot;			# Message displayed when server is full&lt;br /&gt;
#REDIRECT=&amp;quot;ET://ettv2.fragland.org:27960&amp;quot;	# Allows redirecting to other ettv&#039;s&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Downloading&lt;br /&gt;
#&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;					# Can clients download stuff?&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;		# Path to ettv.x86&lt;br /&gt;
						# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are ok!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set com_hunkMegs 256 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	#&lt;br /&gt;
	# Start the slave&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	if [ $SLAVE_ETTV_SLAVES != 0 ]&lt;br /&gt;
		then&lt;br /&gt;
			echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
			echo -e &amp;quot;tv connect $SLAVE_IP:$SLAVE_PORT $SLAVE_ETTV_PASS $SLAVE_PASS\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $SLAVE_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$SLAVE_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$SLAVE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$SLAVE_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$SLAVE_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $SLAVE_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$SLAVE_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$SLAVE_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		$0 start&lt;br /&gt;
		;;	&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you do not want to delete in there, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ettv clean-up script                      #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(\&lt;br /&gt;
&amp;quot;description.txt&amp;quot; \&lt;br /&gt;
&amp;quot;hunkusage.dat&amp;quot; \&lt;br /&gt;
&amp;quot;mp_bin.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak0.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak1.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;et_ice.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;braundorf_b4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;supplydepot2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_goldrush_te.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_oasis_b3.pk3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
ETPRO_FILES=(\&lt;br /&gt;
&amp;quot;etpro-3_2_4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;etpro_cheats.dat&amp;quot; \&lt;br /&gt;
&amp;quot;qagame.mp.i386.so&amp;quot; \&lt;br /&gt;
&amp;quot;tvgame.mp.i386.so&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	hub)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $1 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {hub|slave}\n&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Switching beta&#039;s script ===&lt;br /&gt;
&lt;br /&gt;
This script allows you to quickly switch between the different beta&#039;s Bani has released. Just save it as &amp;lt;code&amp;gt;switchbeta.sh&amp;lt;/code&amp;gt; and adapt the directory fields to your setup. Usage example: &amp;lt;code&amp;gt;./switchbeta.sh 9 hub&amp;lt;/code&amp;gt; switches the hub to beta 9. &amp;lt;code&amp;gt;./switchbeta.sh 4 all&amp;lt;/code&amp;gt; switches hub &amp;amp; slave (or others you can define of course) back to beta 4.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  switching ettv betas script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script allows you to easily switch ETTV beta versions.   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Just put the ettv-beta[x].zip files in directory $REPODIR,    #&lt;br /&gt;
# adapt settings for hub &amp;amp; slave and start switching!           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Paths &amp;amp; files&lt;br /&gt;
#&lt;br /&gt;
REPODIR=&amp;quot;/srv/et&amp;quot;			# Where the ettv-betaX.zip files reside&lt;br /&gt;
HUB_DIR=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
SLAVE_DIR=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Argument check&lt;br /&gt;
#&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
ARGS=2&lt;br /&gt;
E_BADARGS=65&lt;br /&gt;
&lt;br /&gt;
if [ $# -lt &amp;quot;$ARGS&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: missing arguments&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|broadcast|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
FILENAME=&amp;quot;ettv-beta$1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$REPODIR/$FILENAME&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: beta version $1 is not present in $REPODIR.&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $2 in&lt;br /&gt;
	hub)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$HUB_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$SLAVE_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	all)&lt;br /&gt;
		$0 hub&lt;br /&gt;
		$0 slave&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $2 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
		exit $E_BADARGS&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 01:46, 3 January 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2027</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2027"/>
		<updated>2006-01-03T09:51:23Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Slave script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, and as from ETTV b9 the slaves are in fact not limited at all by the original ET netcode, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub. The script generates the server.cfg dynamically every time you start it. If you just want to generate server.cfg do &amp;lt;code&amp;gt;./hub.sh sim&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                    ettv delayed hub script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`		# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;	# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;			# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
HUB_IP=&amp;quot;$PERONI_IP&amp;quot;			# This host is Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;30000&amp;quot;			# Port of public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;	# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
HUB_DELAY=&amp;quot;1&amp;quot;				# Delay between live match &amp;amp; hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;				# 1 ETTV slave connects at an UNLIMITED rate!&lt;br /&gt;
HUB_PRIVATE_SLOTS=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;				# Record the game?&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;				# Slaves don&#039;t download from the hub&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are high enough!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $HUB_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $HUB_SLAVES \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $HUB_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -n $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $HUB_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$HUB_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$HUB_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$HUB_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$HUB_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $HUB_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$HUB_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$HUB_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects a delayed or undelayed slave to a Hub or directly to a gameserver. The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Use &amp;lt;code&amp;gt;./slave.sh sim&amp;lt;/code&amp;gt; to only create etmain/server.cfg. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ETTV slave script                         #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to an ETTV HUB or directly to a game server.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? deej@fragland.org or go to #gamestv.org            #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
# &lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# HUB / Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# HUB / Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;				# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
SLAVE_IP=&amp;quot;$PERONI_IP&amp;quot;				# This host is Peroni&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;				# port of public broadcaster&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;	# shows up on the Hub&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;20&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;5&amp;quot;				# Allow chaining?&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;					# 1 = record game, 0 = don&#039;t&lt;br /&gt;
SLAVE_DELAY=&amp;quot;60&amp;quot;				# Time in seconds&lt;br /&gt;
&lt;br /&gt;
REDIRECT=&amp;quot;Server is full&amp;quot;			# Message displayed when server is full&lt;br /&gt;
#REDIRECT=&amp;quot;ET://ettv2.fragland.org:27960&amp;quot;	# Allows redirecting to other ettv&#039;s&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Downloading&lt;br /&gt;
#&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;					# Can clients download stuff?&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.fragland.org/maps&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;		# Path to ettv.x86&lt;br /&gt;
						# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are ok!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set com_hunkMegs 256 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	#&lt;br /&gt;
	# Start the slave&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	if [ $SLAVE_ETTV_SLAVES != 0 ]&lt;br /&gt;
		then&lt;br /&gt;
			echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
			echo -e &amp;quot;tv connect $SLAVE_IP:$SLAVE_PORT $SLAVE_ETTV_PASS $SLAVE_PASS\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $SLAVE_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$SLAVE_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$SLAVE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$SLAVE_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$SLAVE_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $SLAVE_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$SLAVE_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$SLAVE_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		$0 start&lt;br /&gt;
		;;	&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you do not want to delete in there, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ettv clean-up script                      #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(\&lt;br /&gt;
&amp;quot;description.txt&amp;quot; \&lt;br /&gt;
&amp;quot;hunkusage.dat&amp;quot; \&lt;br /&gt;
&amp;quot;mp_bin.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak0.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak1.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;et_ice.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;braundorf_b4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;supplydepot2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_goldrush_te.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_oasis_b3.pk3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
ETPRO_FILES=(\&lt;br /&gt;
&amp;quot;etpro-3_2_4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;etpro_cheats.dat&amp;quot; \&lt;br /&gt;
&amp;quot;qagame.mp.i386.so&amp;quot; \&lt;br /&gt;
&amp;quot;tvgame.mp.i386.so&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	hub)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $1 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {hub|slave}\n&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Switching beta&#039;s script ===&lt;br /&gt;
&lt;br /&gt;
This script allows you to quickly switch between the different beta&#039;s Bani has released. Just save it as &amp;lt;code&amp;gt;switchbeta.sh&amp;lt;/code&amp;gt; and adapt the directory fields to your setup. Usage example: &amp;lt;code&amp;gt;./switchbeta.sh 9 hub&amp;lt;/code&amp;gt; switches the hub to beta 9. &amp;lt;code&amp;gt;./switchbeta.sh 4 all&amp;lt;/code&amp;gt; switches hub &amp;amp; slave (or others you can define of course) back to beta 4.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  switching ettv betas script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script allows you to easily switch ETTV beta versions.   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Just put the ettv-beta[x].zip files in directory $REPODIR,    #&lt;br /&gt;
# adapt settings for hub &amp;amp; slave and start switching!           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Paths &amp;amp; files&lt;br /&gt;
#&lt;br /&gt;
REPODIR=&amp;quot;/srv/et&amp;quot;			# Where the ettv-betaX.zip files reside&lt;br /&gt;
HUB_DIR=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
SLAVE_DIR=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Argument check&lt;br /&gt;
#&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
ARGS=2&lt;br /&gt;
E_BADARGS=65&lt;br /&gt;
&lt;br /&gt;
if [ $# -lt &amp;quot;$ARGS&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: missing arguments&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|broadcast|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
FILENAME=&amp;quot;ettv-beta$1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$REPODIR/$FILENAME&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: beta version $1 is not present in $REPODIR.&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $2 in&lt;br /&gt;
	hub)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$HUB_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$SLAVE_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	all)&lt;br /&gt;
		$0 hub&lt;br /&gt;
		$0 slave&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $2 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
		exit $E_BADARGS&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 01:46, 3 January 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2026</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2026"/>
		<updated>2006-01-03T09:46:26Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Switching beta&amp;#039;s script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, and as from ETTV b9 the slaves are in fact not limited at all by the original ET netcode, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub. The script generates the server.cfg dynamically every time you start it. If you just want to generate server.cfg do &amp;lt;code&amp;gt;./hub.sh sim&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                    ettv delayed hub script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`		# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;	# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;			# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
HUB_IP=&amp;quot;$PERONI_IP&amp;quot;			# This host is Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;30000&amp;quot;			# Port of public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;	# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
HUB_DELAY=&amp;quot;1&amp;quot;				# Delay between live match &amp;amp; hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;				# 1 ETTV slave connects at an UNLIMITED rate!&lt;br /&gt;
HUB_PRIVATE_SLOTS=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;				# Record the game?&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;				# Slaves don&#039;t download from the hub&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are high enough!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $HUB_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $HUB_SLAVES \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $HUB_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -n $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $HUB_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$HUB_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$HUB_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$HUB_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$HUB_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $HUB_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$HUB_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$HUB_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects a delayed or undelayed slave to a Hub or directly to a gameserver. The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Use &amp;lt;code&amp;gt;./slave.sh sim&amp;lt;/code&amp;gt; to only create etmain/server.cfg. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ETTV slave script                         #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to an ETTV HUB or directly to a game server.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? deej@fragland.org or go to #gamestv.org            #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
# &lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# HUB / Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[put_pass]&amp;quot;			# HUB / Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[put_pass]&amp;quot;				# HUB / Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;				# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
SLAVE_IP=&amp;quot;$PERONI_IP&amp;quot;				# This host is Peroni&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;				# port of public broadcaster&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;	# shows up on the Hub&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;fudiwudi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;20&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;5&amp;quot;				# Allow chaining?&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;					# 1 = record game, 0 = don&#039;t&lt;br /&gt;
SLAVE_DELAY=&amp;quot;60&amp;quot;				# Time in seconds&lt;br /&gt;
&lt;br /&gt;
REDIRECT=&amp;quot;Server is full&amp;quot;			# Message displayed when server is full&lt;br /&gt;
#REDIRECT=&amp;quot;ET://ettv2.fragland.org:27960&amp;quot;	# Allows redirecting to other ettv&#039;s&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Downloading&lt;br /&gt;
#&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;					# Can clients download stuff?&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.fragland.org/maps&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;		# Path to ettv.x86&lt;br /&gt;
						# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are ok!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set com_hunkMegs 256 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	#&lt;br /&gt;
	# Start the slave&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	if [ $SLAVE_ETTV_SLAVES != 0 ]&lt;br /&gt;
		then&lt;br /&gt;
			echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
			echo -e &amp;quot;tv connect $SLAVE_IP:$SLAVE_PORT $SLAVE_ETTV_PASS $SLAVE_PASS\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $SLAVE_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$SLAVE_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$SLAVE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$SLAVE_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$SLAVE_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $SLAVE_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$SLAVE_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$SLAVE_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		$0 start&lt;br /&gt;
		;;	&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you do not want to delete in there, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ettv clean-up script                      #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(\&lt;br /&gt;
&amp;quot;description.txt&amp;quot; \&lt;br /&gt;
&amp;quot;hunkusage.dat&amp;quot; \&lt;br /&gt;
&amp;quot;mp_bin.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak0.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak1.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;et_ice.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;braundorf_b4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;supplydepot2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_goldrush_te.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_oasis_b3.pk3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
ETPRO_FILES=(\&lt;br /&gt;
&amp;quot;etpro-3_2_4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;etpro_cheats.dat&amp;quot; \&lt;br /&gt;
&amp;quot;qagame.mp.i386.so&amp;quot; \&lt;br /&gt;
&amp;quot;tvgame.mp.i386.so&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	hub)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $1 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {hub|slave}\n&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Switching beta&#039;s script ===&lt;br /&gt;
&lt;br /&gt;
This script allows you to quickly switch between the different beta&#039;s Bani has released. Just save it as &amp;lt;code&amp;gt;switchbeta.sh&amp;lt;/code&amp;gt; and adapt the directory fields to your setup. Usage example: &amp;lt;code&amp;gt;./switchbeta.sh 9 hub&amp;lt;/code&amp;gt; switches the hub to beta 9. &amp;lt;code&amp;gt;./switchbeta.sh 4 all&amp;lt;/code&amp;gt; switches hub &amp;amp; slave (or others you can define of course) back to beta 4.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  switching ettv betas script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script allows you to easily switch ETTV beta versions.   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Just put the ettv-beta[x].zip files in directory $REPODIR,    #&lt;br /&gt;
# adapt settings for hub &amp;amp; slave and start switching!           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Paths &amp;amp; files&lt;br /&gt;
#&lt;br /&gt;
REPODIR=&amp;quot;/srv/et&amp;quot;			# Where the ettv-betaX.zip files reside&lt;br /&gt;
HUB_DIR=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
SLAVE_DIR=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Argument check&lt;br /&gt;
#&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
ARGS=2&lt;br /&gt;
E_BADARGS=65&lt;br /&gt;
&lt;br /&gt;
if [ $# -lt &amp;quot;$ARGS&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: missing arguments&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|broadcast|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
FILENAME=&amp;quot;ettv-beta$1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$REPODIR/$FILENAME&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: beta version $1 is not present in $REPODIR.&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $2 in&lt;br /&gt;
	hub)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$HUB_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$SLAVE_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	all)&lt;br /&gt;
		$0 hub&lt;br /&gt;
		$0 slave&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $2 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
		exit $E_BADARGS&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 01:46, 3 January 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User_talk:Deej&amp;diff=2022</id>
		<title>User talk:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User_talk:Deej&amp;diff=2022"/>
		<updated>2006-01-02T17:24:56Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You might want to use the preview button more often.  (&amp;quot;&amp;lt;[NW]reyalP&amp;gt; someone needs to hit deej with the preview stick&amp;quot;) --[[User:WeblionX|WeblionX]] 13:36, 5 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
I plead guilty to being a total Wikinub [[User:Deej|deej]] 14:14, 5 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
I&#039;m getting better at this preview stuff :D.&lt;br /&gt;
&lt;br /&gt;
Thanks for a better image with the colour codes. :) --[[User:Rookie One|Rookie One]] 23:29, 11 November 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
Scripts updated. Now generate server.cfg automatically so no need for those mile-long command lines anymore! -- [[User:Deej|deej]] 09:24, 2 January 2006 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2021</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=2021"/>
		<updated>2006-01-02T17:19:18Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, and as from ETTV b9 the slaves are in fact not limited at all by the original ET netcode, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub. The script generates the server.cfg dynamically every time you start it. If you just want to generate server.cfg do &amp;lt;code&amp;gt;./hub.sh sim&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                    ettv delayed hub script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`		# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;	# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;	# Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;			# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
HUB_IP=&amp;quot;$PERONI_IP&amp;quot;			# This host is Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;30000&amp;quot;			# Port of public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;	# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
HUB_DELAY=&amp;quot;1&amp;quot;				# Delay between live match &amp;amp; hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;				# 1 ETTV slave connects at an UNLIMITED rate!&lt;br /&gt;
HUB_PRIVATE_SLOTS=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;				# Record the game?&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;				# Slaves don&#039;t download from the hub&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are high enough!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $HUB_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $HUB_SLAVES \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $HUB_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ -n $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $HUB_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$HUB_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$HUB_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$HUB_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$HUB_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $HUB_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$HUB_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$HUB_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects a delayed or undelayed slave to a Hub or directly to a gameserver. The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Use &amp;lt;code&amp;gt;./slave.sh sim&amp;lt;/code&amp;gt; to only create etmain/server.cfg. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ETTV slave script                         #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to an ETTV HUB or directly to a game server.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script generates etmain/server.cfg dynamically.          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? deej@fragland.org or go to #gamestv.org            #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
# &lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# HUB / Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[put_pass]&amp;quot;			# HUB / Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[put_pass]&amp;quot;				# HUB / Match server password&lt;br /&gt;
&lt;br /&gt;
MATCH_HOME_TEAM=&amp;quot;uQ&amp;quot;				# Making our hostname more fancy ;-)&lt;br /&gt;
MATCH_AWAY_TEAM=&amp;quot;Logitech&amp;quot;&lt;br /&gt;
MATCH_CUP=&amp;quot;Warleagues&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
SLAVE_IP=&amp;quot;$PERONI_IP&amp;quot;				# This host is Peroni&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;				# port of public broadcaster&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;	# shows up on the Hub&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;$ETTV_CLIENT - ^3$MATCH_CUP^7: $MATCH_HOME_TEAM vs $MATCH_AWAY_TEAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;fudiwudi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;20&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;5&amp;quot;				# Allow chaining?&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;1&amp;quot;					# 1 = record game, 0 = don&#039;t&lt;br /&gt;
SLAVE_DELAY=&amp;quot;60&amp;quot;				# Time in seconds&lt;br /&gt;
&lt;br /&gt;
REDIRECT=&amp;quot;Server is full&amp;quot;			# Message displayed when server is full&lt;br /&gt;
#REDIRECT=&amp;quot;ET://ettv2.fragland.org:27960&amp;quot;	# Allows redirecting to other ettv&#039;s&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Downloading&lt;br /&gt;
#&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;					# Can clients download stuff?&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.fragland.org/maps&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;		# Path to ettv.x86&lt;br /&gt;
						# Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Make sure buffers are ok!&lt;br /&gt;
#&lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max &lt;br /&gt;
echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set com_hunkMegs 256 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+exec server.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	#&lt;br /&gt;
	# Start the slave&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	if [ $SLAVE_ETTV_SLAVES != 0 ]&lt;br /&gt;
		then&lt;br /&gt;
			echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
			echo -e &amp;quot;tv connect $SLAVE_IP:$SLAVE_PORT $SLAVE_ETTV_PASS $SLAVE_PASS\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -SIGTERM $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
create_config (){&lt;br /&gt;
	#&lt;br /&gt;
	# Generate etmain/server.cfg&lt;br /&gt;
	#	&lt;br /&gt;
	TIMESTAMP=`date +&amp;quot;%d/%m/%Y %H:%M:%S&amp;quot;`&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;//&amp;quot; &amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;// server.cfg generated $TIMESTAMP&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;//\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set sv_privateclients $SLAVE_PRIVATE_SLOTS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_maxRate 25000&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_hostname \&amp;quot;$SLAVE_HOSTNAME\&amp;quot;\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set g_password \&amp;quot;$SLAVE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set rconpassword \&amp;quot;$SLAVE_RCON_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_privatepassword \&amp;quot;$SLAVE_PRIVATE_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_allowDownload $ALLOW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwDownload $ALLOW_WWW_DL&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set sv_wwwBaseURL \&amp;quot;$WWW_DL_URL\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set sv_wwwDlDisconnected 0\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_ettv_flags 3&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_delay $SLAVE_DELAY&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_autorecord $RECORD_GAME&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_clientname \&amp;quot;$ETTV_CLIENT\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_maxslaves \&amp;quot;$SLAVE_ETTV_SLAVES\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_password \&amp;quot;$SLAVE_ETTV_PASS\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_netblast $ETTV_NETBLAST&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_tv_iptos $ETTV_TV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set ettv_sv_iptos $ETTV_SV_IPTOS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set ettv_mtu $ETTV_MTU\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;set b_crashlogpath \&amp;quot;$BASEPATH/etpro\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo &amp;quot;set g_log \&amp;quot;slave.log\&amp;quot;&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	echo -e &amp;quot;set logfile 2\n&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
	&lt;br /&gt;
	echo &amp;quot;tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot; &amp;gt;&amp;gt; $BASEPATH/etmain/server.cfg&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		create_config&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		$0 stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		$0 start&lt;br /&gt;
		;;	&lt;br /&gt;
	sim)&lt;br /&gt;
		create_config&lt;br /&gt;
		echo -e &amp;quot;\nFollowing config was generated automatically:\n&amp;quot;&lt;br /&gt;
		cat $BASEPATH/etmain/server.cfg&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart|sim}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you do not want to delete in there, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     ettv clean-up script                      #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(\&lt;br /&gt;
&amp;quot;description.txt&amp;quot; \&lt;br /&gt;
&amp;quot;hunkusage.dat&amp;quot; \&lt;br /&gt;
&amp;quot;mp_bin.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak0.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak1.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;pak2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;et_ice.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;braundorf_b4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;supplydepot2.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_goldrush_te.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;sw_oasis_b3.pk3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
ETPRO_FILES=(\&lt;br /&gt;
&amp;quot;etpro-3_2_4.pk3&amp;quot; \&lt;br /&gt;
&amp;quot;etpro_cheats.dat&amp;quot; \&lt;br /&gt;
&amp;quot;qagame.mp.i386.so&amp;quot; \&lt;br /&gt;
&amp;quot;tvgame.mp.i386.so&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
	hub)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $1 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {hub|slave}\n&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Switching beta&#039;s script ===&lt;br /&gt;
&lt;br /&gt;
This script allows you to quickly switch between the different beta&#039;s Bani has released. Just save it as &amp;lt;code&amp;gt;switchbeta.sh&amp;lt;/code&amp;gt; and adapt the directory fields to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  switching ettv betas script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                           deej.                               #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script allows you to easily switch ETTV beta versions.   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Just put the ettv-beta[x].zip files in directory $REPODIR,    #&lt;br /&gt;
# adapt settings for hub &amp;amp; slave and start switching!           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Paths &amp;amp; files&lt;br /&gt;
#&lt;br /&gt;
REPODIR=&amp;quot;/srv/et&amp;quot;			# Where the ettv-betaX.zip files reside&lt;br /&gt;
HUB_DIR=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
SLAVE_DIR=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Argument check&lt;br /&gt;
#&lt;br /&gt;
SCRIPT_NAME=`basename $0`&lt;br /&gt;
ARGS=2&lt;br /&gt;
E_BADARGS=65&lt;br /&gt;
&lt;br /&gt;
if [ $# -lt &amp;quot;$ARGS&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: missing arguments&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|broadcast|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
FILENAME=&amp;quot;ettv-beta$1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e &amp;quot;$REPODIR/$FILENAME&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo -e &amp;quot;\nError: beta version $1 is not present in $REPODIR.&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
	exit $E_BADARGS&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $2 in&lt;br /&gt;
	hub)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$HUB_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$HUB_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	slave)&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR&amp;quot; ettv.x86&lt;br /&gt;
		chmod +x &amp;quot;$SLAVE_DIR/ettv.x86&amp;quot;&lt;br /&gt;
		unzip -o &amp;quot;$REPODIR/$FILENAME&amp;quot; -d &amp;quot;$SLAVE_DIR/etpro&amp;quot; tvgame.mp.i386.so&lt;br /&gt;
		;;&lt;br /&gt;
	all)&lt;br /&gt;
		$0 hub&lt;br /&gt;
		$0 slave&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		echo -e &amp;quot;\nError: $2 is not a valid installation target.&amp;quot;&lt;br /&gt;
		echo -e &amp;quot;Usage: $SCRIPT_NAME {beta number} {hub|slave|all}\n&amp;quot;&lt;br /&gt;
		exit $E_BADARGS&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User_talk:RoadKillPuppy&amp;diff=1952</id>
		<title>User talk:RoadKillPuppy</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User_talk:RoadKillPuppy&amp;diff=1952"/>
		<updated>2005-12-02T22:33:27Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Nice mod Puppy, I shall come and spree some more on your server ^^ - [[User:Deej|deej]]&lt;br /&gt;
&lt;br /&gt;
Just FYI - this -1 is actually the client number the sound should be played to, and -1 means broadcasting to all. ;) --Rookie One 11:35, 2 December 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
Yep. RKP had to do it this way since ETPro doesn&#039;t have a command to send the sound to only 1 specific player. [[User:Deej|deej]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User_talk:RoadKillPuppy&amp;diff=1950</id>
		<title>User talk:RoadKillPuppy</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User_talk:RoadKillPuppy&amp;diff=1950"/>
		<updated>2005-12-02T16:34:50Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Nice mod Puppy, I shall come and spree some more on your server ^^ - [[User:Deej|deej]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=1670</id>
		<title>WolfWiki:Community Portal</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=1670"/>
		<updated>2005-11-11T22:32:28Z</updated>

		<summary type="html">&lt;p&gt;Deej: Added Ifurita&amp;#039;s site&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== News Sites ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.et-center.com/ ET-Center]&lt;br /&gt;
* [http://www.xfire.be/ Xfire.be]&lt;br /&gt;
* [http://www.gamestv.org/ GAMESTV.ORG]&lt;br /&gt;
* [http://www.swertcw.com/ sweRTCW]&lt;br /&gt;
* [http://www.planetwolfenstein.com/ Planet Wolfenstein]&lt;br /&gt;
* [http://www.etnation.co.uk/ ETNation.co.uk]&lt;br /&gt;
* [http://www.splashdamage.com/ SplashDamage.com]&lt;br /&gt;
* [http://www.planetwolfenstein.de/ PlanetWolfenstein.de]&lt;br /&gt;
* [http://www.rtcw.co.uk/ rtcw.co.uk]&lt;br /&gt;
* [http://velocity.lunarpages.com/index.html Unofficial Enemy Territory Strategy Guide]&lt;br /&gt;
* [http://www.planetwolfenstein.com/4newbies/ RTCW 4 Newbies]&lt;br /&gt;
* [http://www.enemy-territory.com Enemy Territory Resource Site]&lt;br /&gt;
&lt;br /&gt;
== Leagues / Competitions ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.clanbase.com/ Clanbase]&lt;br /&gt;
* [http://www.teamwarfare.com/ TeamWarfare League]&lt;br /&gt;
* [http://www.sta-league.org/ Stronger Than All]&lt;br /&gt;
* [http://www.et-cup.net/ ET-Cup]&lt;br /&gt;
* [http://www.warleagues.com/ Warleagues]&lt;br /&gt;
&lt;br /&gt;
== Mods ==&lt;br /&gt;
&lt;br /&gt;
* [http://stealthy.foolishgames.net/ FalckonET]&lt;br /&gt;
* [http://www.truecombat.com/intro.php TC:Elite]&lt;br /&gt;
* [http://www.omni-bot.com/ Omni-Bot]&lt;br /&gt;
* [http://www.priceofpeace.net/ The Price of Peace]&lt;br /&gt;
* [http://www.etpub.org/news.php ETPub]&lt;br /&gt;
* [http://jaymod.clanfu.org/ Jaymod]&lt;br /&gt;
* [http://www.splashdamage.com/index.php?name=pnPHPbb2&amp;amp;file=viewtopic&amp;amp;t=7522 ET-Mod-Project-List]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=1666</id>
		<title>WolfWiki:Community Portal</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=WolfWiki:Community_Portal&amp;diff=1666"/>
		<updated>2005-11-11T22:03:47Z</updated>

		<summary type="html">&lt;p&gt;Deej: more sites&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== News Sites ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.et-center.com/ ET-Center]&lt;br /&gt;
* [http://www.xfire.be/ Xfire.be]&lt;br /&gt;
* [http://www.gamestv.org/ GAMESTV.ORG]&lt;br /&gt;
* [http://www.swertcw.com/ sweRTCW]&lt;br /&gt;
* [http://www.planetwolfenstein.com/ Planet Wolfenstein]&lt;br /&gt;
* [http://www.etnation.co.uk/ ETNation.co.uk]&lt;br /&gt;
* [http://www.splashdamage.com/ SplashDamage.com]&lt;br /&gt;
* [http://www.planetwolfenstein.de/ PlanetWolfenstein.de]&lt;br /&gt;
* [http://www.rtcw.co.uk/ rtcw.co.uk]&lt;br /&gt;
* [http://velocity.lunarpages.com/index.html Unofficial Enemy Territory Strategy Guide]&lt;br /&gt;
* [http://www.enemy-territory.com Enemy Territory Resource Site]&lt;br /&gt;
&lt;br /&gt;
== Leagues / Competitions ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.clanbase.com/ Clanbase]&lt;br /&gt;
* [http://www.teamwarfare.com/ TeamWarfare League]&lt;br /&gt;
* [http://www.sta-league.org/ Stronger Than All]&lt;br /&gt;
* [http://www.et-cup.net/ ET-Cup]&lt;br /&gt;
* [http://www.warleagues.com/ Warleagues]&lt;br /&gt;
&lt;br /&gt;
== Mods ==&lt;br /&gt;
&lt;br /&gt;
* [http://stealthy.foolishgames.net/ FalckonET]&lt;br /&gt;
* [http://www.truecombat.com/intro.php TC:Elite]&lt;br /&gt;
* [http://www.omni-bot.com/ Omni-Bot]&lt;br /&gt;
* [http://www.priceofpeace.net/ The Price of Peace]&lt;br /&gt;
* [http://www.etpub.org/news.php ETPub]&lt;br /&gt;
* [http://jaymod.clanfu.org/ Jaymod]&lt;br /&gt;
* [http://www.splashdamage.com/index.php?name=pnPHPbb2&amp;amp;file=viewtopic&amp;amp;t=7522 ET-Mod-Project-List]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Color_Codes&amp;diff=1665</id>
		<title>Color Codes</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Color_Codes&amp;diff=1665"/>
		<updated>2005-11-11T21:59:25Z</updated>

		<summary type="html">&lt;p&gt;Deej: even more colours&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What are they?==&lt;br /&gt;
Colour codes, as the name suggests, are used to add colour to texts. They have been introduced in Quake III Arena and are available in most Q3-based games, including Enemy Territory. They can be used in most texts that get displayed ingame, such as player names, chat or notices.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; a dash character (&#039;&#039;&#039;^&#039;&#039;&#039;) followed by another character. Each character produces a different colour.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; ^1red ^2green ^4blue&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Produces:&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;blue&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Codes list==&lt;br /&gt;
The image below depicts the colours the characters produce, except &#039;&#039;&#039;^0&#039;&#039;&#039; which, stands for black. Notice that some letters and digits produce the same colour.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
http://velocity.lunarpages.com/images/colors.jpg&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1651</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1651"/>
		<updated>2005-11-10T09:19:51Z</updated>

		<summary type="html">&lt;p&gt;Deej: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Can be increased to avoid fragmentation&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you do not want to delete in there, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 reT!reD.ettv clean-up script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(&amp;quot;description.txt&amp;quot; &amp;quot;hunkusage.dat&amp;quot; &amp;quot;mp_bin.pk3&amp;quot; &amp;quot;pak0.pk3&amp;quot; &amp;quot;pak1.pk3&amp;quot; &amp;quot;pak2.pk3&amp;quot; &amp;quot;qagame.mp.i386.so&amp;quot;)&lt;br /&gt;
ETPRO_FILES=(&amp;quot;etpro-3_2_0.pk3&amp;quot; &amp;quot;etpro_cheats.dat&amp;quot; &amp;quot;qagame.mp.i386.so&amp;quot; &amp;quot;tvgame.mp.i386.so&amp;quot; &amp;quot;animations&amp;quot; &amp;quot;configs&amp;quot; &amp;quot;maps&amp;quot; &amp;quot;etpromapscripts&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 01:18, 10 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1650</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1650"/>
		<updated>2005-11-10T09:18:34Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Can be increased to avoid fragmentation&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sanitization script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to restore an ETTV directory to the bare minimum required to broadcast matches or be a hub. It isn&#039;t a very advanced script but it gets the job done. Copy / paste this script and save it as &amp;lt;code&amp;gt;sanitize.sh&amp;lt;/code&amp;gt; or any other name you prefer. Just do &amp;lt;code&amp;gt;./sanitize.sh&amp;lt;/code&amp;gt; do delete all files in etmain &amp;amp; etpro that are not needed anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: this script deletes &#039;&#039;&#039;everything&#039;&#039;&#039; it finds in the etmain and etpro directories. If you have stuff that you don&#039;t want to delete in their, add it to the ETMAIN_FILES &amp;amp; ETPRO_FILES arrays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 reT!reD.ettv clean-up script                  #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
# This script is used to restore an ETTV directory to the bare  #&lt;br /&gt;
# minimum in terms of files.                                    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Use it to clean up after an ETTV session so you can start the #&lt;br /&gt;
# next session with a minimum of PK3s.                          #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
ETMAIN_FILES=(&amp;quot;description.txt&amp;quot; &amp;quot;hunkusage.dat&amp;quot; &amp;quot;mp_bin.pk3&amp;quot; &amp;quot;pak0.pk3&amp;quot; &amp;quot;pak1.pk3&amp;quot; &amp;quot;pak2.pk3&amp;quot; &amp;quot;qagame.mp.i386.so&amp;quot;)&lt;br /&gt;
ETPRO_FILES=(&amp;quot;etpro-3_2_0.pk3&amp;quot; &amp;quot;etpro_cheats.dat&amp;quot; &amp;quot;qagame.mp.i386.so&amp;quot; &amp;quot;tvgame.mp.i386.so&amp;quot; &amp;quot;animations&amp;quot; &amp;quot;configs&amp;quot; &amp;quot;maps&amp;quot; &amp;quot;etpromapscripts&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Test for existence of backup directories&lt;br /&gt;
#&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etmain/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etmain/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d &amp;quot;$BASEPATH/etpro/bak/&amp;quot; ]; then&lt;br /&gt;
	mkdir &amp;quot;$BASEPATH/etpro/bak&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/$i&amp;quot; &amp;quot;$BASEPATH/etmain/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etmain/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clear etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/$i&amp;quot; &amp;quot;$BASEPATH/etpro/bak/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
rm $BASEPATH/etpro/*&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etmain&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETMAIN_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etmain/bak/$i&amp;quot; &amp;quot;$BASEPATH/etmain/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Restore etpro&lt;br /&gt;
#&lt;br /&gt;
for i in ${ETPRO_FILES[@]}&lt;br /&gt;
do&lt;br /&gt;
	mv &amp;quot;$BASEPATH/etpro/bak/$i&amp;quot; &amp;quot;$BASEPATH/etpro/&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Clean the backup directories&lt;br /&gt;
#&lt;br /&gt;
rm -Rf $BASEPATH/etmain/bak&lt;br /&gt;
rm -Rf $BASEPATH/etpro/bak&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 01:18, 10 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=B_placebo&amp;diff=1641</id>
		<title>B placebo</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=B_placebo&amp;diff=1641"/>
		<updated>2005-11-08T17:09:10Z</updated>

		<summary type="html">&lt;p&gt;Deej: Links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Magical Beginning ==&lt;br /&gt;
&lt;br /&gt;
Strangely, when this cvar was found in the CVS tree for ETPro, there wasn&#039;t a name for the contributor next to it and to this day the [[ETPro_Developer|ETPro devs]] don&#039;t know where it came from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
When using this cvar anything is possible.  As an example, you will be given the sticky bullet syndrome and will be able to shoot people through the corner of walls when they run away. &lt;br /&gt;
&lt;br /&gt;
Features include:&lt;br /&gt;
&lt;br /&gt;
* You will not be as easily damaged by explosions &#039;&#039;(as long as you aren&#039;t too close to the explosion)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Your team will win every game &#039;&#039;(as long as your team is better than your enemy)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* When defusing dynamite, it won&#039;t matter how far into the 30 seconds it is, you will always be able to defuse it on time. &#039;&#039;(as long as you start defusing before 5 seconds is left on the clock)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* You can now jump twice as far as normal &#039;&#039;(Only works if you have 333fps)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Your grenades will hit the target with 100% damage &#039;&#039;(Depends if your grenade is actually close to the target)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Why keep it? ==&lt;br /&gt;
&lt;br /&gt;
The cvar can&#039;t be removed as it has been hidden within the deepest parts of the ET source; it is so deep that even the magical [[User:Rain|Rain]] cannot find it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== I Can&#039;t Find it ==&lt;br /&gt;
&lt;br /&gt;
The cvar does not show up when you try to tab complete it within the console.  You just have to insert it in your config and then you can rest assured that it is working.&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=B_placebo&amp;diff=1640</id>
		<title>B placebo</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=B_placebo&amp;diff=1640"/>
		<updated>2005-11-08T17:07:14Z</updated>

		<summary type="html">&lt;p&gt;Deej: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Magical Beginning ==&lt;br /&gt;
&lt;br /&gt;
Strangely, when this cvar was found in the CVS tree for ETPro, there wasn&#039;t a name for the contributor next to it and to this day the ETPro devs don&#039;t know where it came from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
When using this cvar anything is possible.  As an example, you will be given the sticky bullet syndrome and will be able to shoot people through the corner of walls when they run away. &lt;br /&gt;
&lt;br /&gt;
Features include:&lt;br /&gt;
&lt;br /&gt;
* You will not be as easily damaged by explosions &#039;&#039;(as long as you aren&#039;t too close to the explosion)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Your team will win every game &#039;&#039;(as long as your team is better than your enemy)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* When defusing dynamite, it won&#039;t matter how far into the 30 seconds it is, you will always be able to defuse it on time. &#039;&#039;(as long as you start defusing before 5 seconds is left on the clock)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* You can now jump twice as far as normal &#039;&#039;(Only works if you have 333fps)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Your grenades will hit the target with 100% damage &#039;&#039;(Depends if your grenade is actually close to the target)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Why keep it? ==&lt;br /&gt;
&lt;br /&gt;
The cvar can&#039;t be removed as it has been hidden within the deepest parts of the ET source; it is so deep that even the magical Rain cannot find it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== I Can&#039;t Find it ==&lt;br /&gt;
&lt;br /&gt;
The cvar does not show up when you try to tab complete it within the console.  You just have to insert it in your config and then you can rest assured that it is working.&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=1631</id>
		<title>ETTV:Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=1631"/>
		<updated>2005-11-08T08:52:05Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Setting up your slave to allow connections from other slaves */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;dot_graph&amp;gt;&lt;br /&gt;
digraph ettv {&lt;br /&gt;
master -&amp;gt; slave1&lt;br /&gt;
master -&amp;gt; slave2&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;client1..&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;..client50&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;client51..&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;..client100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dot_graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Master&amp;quot; (gameserver)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Start your gameserver as normal, but run ettv.x86 instead of etded.x86.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039; (default 0, no slave connections allowed)&lt;br /&gt;
:Number of ettv slaves allowed to connect.&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; Slave slots are always reserved, like private slots.&lt;br /&gt;
&#039;&#039;&#039;ettv_password&#039;&#039;&#039; (default &amp;quot;&amp;quot;, no slave connections allowed) &lt;br /&gt;
:Password for ettv slaves.&lt;br /&gt;
:Must be set, or no slaves will be able to connect!&lt;br /&gt;
&#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039; (default 1)&lt;br /&gt;
:1 = prevent slaves from being callvote kicked&lt;br /&gt;
:2 = grant shoutcaster status to slaves&lt;br /&gt;
:values can be added together, eg 3 for both features.&lt;br /&gt;
&lt;br /&gt;
===Playing on the master===&lt;br /&gt;
Players may now connect to your gameserver as normal.&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Slave&amp;quot; (broadcast server)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Copy tvgame.mp.i386.so to the same directory as your etpro/qagame.mp.i386.so is located.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&#039;&#039;&#039;sv_maxclients&#039;&#039;&#039;&lt;br /&gt;
:Number of spectator clients to allow. This number is only limited by available cpu and memory.&lt;br /&gt;
:Some guidelines when provisioning a broadcast server:&lt;br /&gt;
:*100 spectator slots will require ~ 128mb ram. Use com_hunkmegs to set this.&lt;br /&gt;
:*100 spectator slots will require ~ 768kbyte/sec (6mbits), roughly 6kbyte/sec per client&lt;br /&gt;
:*100 spectator slots will take ~ 80% cpu of a Xeon 2.2ghz&lt;br /&gt;
:*Each slave will require ~20-40kbyte/sec from the master.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_clientname&#039;&#039;&#039; (default &amp;quot;ETTV&amp;quot;)&lt;br /&gt;
:Playername the slave will use when connecting to the master, eg &amp;quot;ETTV-xyz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_delay&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of seconds for slave to delay the master feed. Recording/playback chains should no longer be needed, and slaves should always maintain an exact delay from the master server. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: this should ONLY be set on the slave.&lt;br /&gt;
:&#039;&#039;note&#039;&#039;: only supported in ettv beta8 and later&lt;br /&gt;
&lt;br /&gt;
===Chat passwords===&lt;br /&gt;
In order to curb the rampant abuse of ettv chat, admins may set &amp;quot;chat passwords&amp;quot; on their servers. If enabled, viewers are not allowed to chat unless they have a password. You can define as many passwords as you like, so you can easily track down individual abusers and limit the damage of stolen passwords.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpasswords&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of chat passwords defined.&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpassword&#039;&#039;&#039;(1-99999)&lt;br /&gt;
:individual chat passwords.&lt;br /&gt;
&lt;br /&gt;
viewers use &amp;lt;tt&amp;gt;/chatpassword &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;password&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; to login.&lt;br /&gt;
&lt;br /&gt;
if logged in, ettv chats will be tagged with a number in parentheses identifying which chat password the viewer is using. &lt;br /&gt;
===Misc commands for viewers===&lt;br /&gt;
;For ettv beta 4 and above&lt;br /&gt;
* spectators may &amp;lt;tt&amp;gt;/ignore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/unignore&amp;lt;/tt&amp;gt; other spectators&lt;br /&gt;
* &amp;lt;i&amp;gt;semiadmin&amp;lt;/i&amp;gt; functionality now works for slaves&lt;br /&gt;
* rcon may now mute/unmute specs &lt;br /&gt;
&lt;br /&gt;
===Connect the slave===&lt;br /&gt;
Now start your slave server by running ettv.x86&lt;br /&gt;
&lt;br /&gt;
Tell the slave server to connect up to the master server:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv connect master.ip.address:port &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;ettv_password&amp;lt;/b&amp;gt;(required)&amp;lt;/i&amp;gt; &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;g_password&amp;lt;/b&amp;gt;(if the master has a g_password set)&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have configured everything correctly, the slave should connect to the master.&lt;br /&gt;
Clients should now be able to connect to the slave and spectate the game in progress.&lt;br /&gt;
&lt;br /&gt;
This is a &amp;quot;live broadcast&amp;quot; with no delay.&lt;br /&gt;
&lt;br /&gt;
===Disconnect the slave===&lt;br /&gt;
To tell the slave to disconnect from the master:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv disconnect&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Slave Chaining===&lt;br /&gt;
&lt;br /&gt;
==== What is chaining and why chain slaves? ====&lt;br /&gt;
&lt;br /&gt;
ETTV allows chaining slaves together. This very neat feature lets you connect one ETTV slave to another ETTV slave that is broadcasting a match instead of directly to the game server hosting the match. Apart from the &amp;quot;w00t this is very cool&amp;quot; factor, why is this feature so important for admins? Basicly, working in a chained model allows to broadcast a match to a large number of spectators without too much hastle and too many risks for the master server.&lt;br /&gt;
&lt;br /&gt;
Chaining was developped for a simple reason: if you take into account that one ETTV slave connects at an &#039;&#039;&#039;unlimited&#039;&#039;&#039; rate to a master, you really don&#039;t want to connect 15 or 20 slaves to a game server to broadcast let&#039;s say the &#039;&#039;Atlantic Battle&#039;&#039;. Chances are you will bring down the master game server and thus the game. Chaining slaves firmly alleviates the load on the master game server. 2 or 4 of these &#039;&#039;Hubs&#039;&#039; can do the job of delaying the signal and feeding it to other slaves.&lt;br /&gt;
&lt;br /&gt;
Other benefits might include better network performance. If you can choose to either connect your slave to the game server where your connection is not optimal or to a nearby slave who is on a better connection to the master, it might help the quality of your broadcast. Plus you don&#039;t need to record anything when connecting to a delayed slave.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your slave to allow connections from other slaves ====&lt;br /&gt;
&lt;br /&gt;
This part is actually pretty easy. You need to set up your slave as if you were setting up a master game server. This means that, next to the normal slave parameters, you have to set up the following:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039;: set this to at least 1&lt;br /&gt;
* &#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039;: set this to at least 1. Depending on how powerful your machine is you can set this number higher. Don&#039;t set it too high though, a slave still connects at an unlimited rate&lt;br /&gt;
* &#039;&#039;&#039;ettv_password&#039;&#039;&#039;: set to something else than &amp;quot;&amp;quot;. This password is needed by the slaves connecting to your slave (together with g_password of course)&lt;br /&gt;
&lt;br /&gt;
Other settings such as ettv_netblast, ettv_tv_iptos etc... can be set as well. You can even use autorecord if you wish, or just add an extra delay.&lt;br /&gt;
&lt;br /&gt;
==== Pitfalls ====&lt;br /&gt;
&lt;br /&gt;
There are however a few risks associated with slave chaining. One of the biggest issues is &#039;&#039;&#039;PK3 dependancies&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As you know, a slave needs to have at least all the PK3s of the server it connects too. But a slave can have more PK3s installed, as long as it has the ones on the server&#039;s pure list. This is what complicates things! The further you go down the &amp;quot;chain&amp;quot;, the more the chances exist of PK3 pollution, which makes the job of the last slave very hard. And the viewers connecting to that slave will not be very happy either.&lt;br /&gt;
&lt;br /&gt;
So for those of you venturing into chaining slaves here&#039;s a rule of thumb: &#039;&#039;&#039;always keep the installed PK3s to the bare minimum&#039;&#039;&#039;! Do not add stuff you do not need. If you want to know what PK3s you need and not need, connect your slave to the master or the hub, see which PK3s are on the pure list and rename or remove the PK3s that are not on the list. You will make your viewers and other admins connecting to your slave very happy.&lt;br /&gt;
&lt;br /&gt;
Another risk could be &#039;&#039;&#039;chained lag&#039;&#039;&#039;. If one of the slaves that is higher in the chain starts lagging, the consequenses for the slaves depending on it will be seen immedeatily. So if you offer to be one of the higher slaves in the chain, make sure your machine can handle it! An ETTV chain is much like the food chain ;-).&lt;br /&gt;
&lt;br /&gt;
==== Admin contributions ====&lt;br /&gt;
&lt;br /&gt;
If by now you feel like getting your hands dirty in ETTV chaining madness and you want to see some example of hubs, slaves, broadcasters and scripts to get it all working, you can already start by checking out [[User:Deej|deej&#039;s page]].&lt;br /&gt;
&lt;br /&gt;
==ETTV Demos==&lt;br /&gt;
You may record the match in progress to a file, with the command:&lt;br /&gt;
:&amp;lt;tt&amp;gt;record &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
If you omit the demo name, ettv will start recording using a filename of demoXXXX where XXXX is the first available number starting from 0000.&lt;br /&gt;
&lt;br /&gt;
Demos will stop recording when a map changes.&lt;br /&gt;
&lt;br /&gt;
To stop recording a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;stoprecord&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To play back a recorded demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of an ettv slave:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv status&amp;lt;/tt&amp;gt;&lt;br /&gt;
This will tell you if the slave is connected to a master, or if it is currently playing back a demo.&lt;br /&gt;
&lt;br /&gt;
To fastforward a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;ff &amp;lt;i&amp;gt;&amp;lt;seconds&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
Eg &amp;lt;tt&amp;gt;ff 30&amp;lt;/tt&amp;gt; will fast foward 30 seconds. Fast forward stops at map restarts, so you can safely ff 999 to fast forward through a warmup. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: requires ettv beta 7 or later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Autorecording demos===&lt;br /&gt;
ettv is able to automatically continuously record demos, creating new demofiles when the map changes. To do this, set the cvar ettv_autorecord to 1. ettv will start recording demos with the name demoXXXX where XXXX is a number starting at 0000 and incrementing on each map change.&lt;br /&gt;
&lt;br /&gt;
Server admins may find it useful to use the demo recording feature of ettv to record matches, instead of requiring individual players to record them. An ettv demo records everything that happens on a server, including all player viewpoints.&lt;br /&gt;
&lt;br /&gt;
===How to create demo based delayed feeds===&lt;br /&gt;
Autorecording demos is the first half of the process for delayed feeds. Typically you would run a passworded slave server with the smallest number of sv_maxclients possible. No spectators should connect to this server. The only purpose of this slave is to connect up to the master and record the match to sequentially numbered demofiles.&lt;br /&gt;
&lt;br /&gt;
Now start up a slave, and tell it to broadcast the demo being recorded.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo demo0000&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wait approx. 60 seconds after the master begins recording before issuing this command to your slaves, then you have a 60 second delay on your broadcast.&lt;br /&gt;
&lt;br /&gt;
If you want slaves to automatically switch to the next demo when the end of the demo is reached (eg on a map change), you would set the cvar ettv_autoplay to 1. If a slave is playing demo0000 and it reaches the end, it will then try to play demo0001 and so on.&lt;br /&gt;
&lt;br /&gt;
Disadvantage of this method: It is not automated in ettv itself, though admins can script it.&lt;br /&gt;
Advantage of this method: You may run multiple broadcast servers from the same single demo stream.&lt;br /&gt;
&lt;br /&gt;
Automated delayed feeds are supported in ettv beta 8. See the above.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* The slave server must be running the same fs_game setting as the master server.&lt;br /&gt;
* The slave server must have a copy of every map pk3 the master server is using.&lt;br /&gt;
* If the master server loads a map the slave server doesn&#039;t have, the slave will get stuck.&lt;br /&gt;
* Spectators will be forced to download any custom pk3 you are using.&lt;br /&gt;
* It is a good idea to keep the master server pk3 list to a minimum.&lt;br /&gt;
* If you are using the autorecord/autoplay feature for running delayed feeds, you will usually want to make sure you clear out the demos directory first. Autorecording will start numbering demofiles using the first available number, so if you have old recorded demos then ettv might start recording from eg demo0017. If your scripts expect to start playback from demo0000 then you might end up broadcasting a game recorded at some earlier date...&lt;br /&gt;
&lt;br /&gt;
==Miscellaneous==&lt;br /&gt;
&lt;br /&gt;
Slaves may send chats to the master with the command msay&lt;br /&gt;
Slaves may list players on the master with the command players&lt;br /&gt;
&lt;br /&gt;
==Performance tuning==&lt;br /&gt;
&lt;br /&gt;
Spectator servers with large numbers of clients (eg &amp;gt;100) will push the OS very hard with huge amounts of UDP traffic. The default OS buffer settings for Linux are inadequate and can hurt performance, causing lag and/or disconnects.&lt;br /&gt;
&lt;br /&gt;
If you get messages like&lt;br /&gt;
:&amp;lt;tt&amp;gt;NET_SendPacket ERROR: No buffer space available to 192.168.120.142:27960&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you definitely need to increase your kernel network buffers.&lt;br /&gt;
&lt;br /&gt;
Large spectator servers should increase the kernel buffers.&lt;br /&gt;
&lt;br /&gt;
The following commands should be issued as root on linux:&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FreeBSD can try this:&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.recvspace=65535&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.maxdgram=57344&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w kern.ipc.maxsockbuf=8388608&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Network tuning cvars===&lt;br /&gt;
;The following are only available in ettv beta 7 and later.&lt;br /&gt;
By default, et uses small packets of 1400 bytes or less to send to clients. If messages need to be larger, they are &#039;fragmented&#039; and sent over several server frames. ettv slave messages tend to be large and often fragment. ettv normally tries to send slaves all fragments at once to avoid jittery playback, but some networks / OSes handle this badly. ettv beta 7 introduces new controls so admins can optimize ettv for their individual network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_netblast&#039;&#039;&#039; (default 1)&lt;br /&gt;
:by default, ettv tries to send all fragments at once. some networks may handle this badly. setting this to 0 disables. warning: setting this to 0 without increasing ettv_mtu will result in severely laggy slave playback.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_mtu&#039;&#039;&#039; (default 1400)&lt;br /&gt;
:; master only&lt;br /&gt;
:if your network / os supports it, you can set this to large values (eg 16000) to prevent message fragmentation and provide smoother ettv links. this cvar has no effect on normal ET clients. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: ettv_mtu must currently be set from commandline, it cannot be changed on the fly (yet).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_tv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:you can set the ip type of service field of ettv link packets. if your network/ISP supports it, you can use a value like 16 (&amp;quot;minimize delay&amp;quot;) to prioritize ettv link packets over others on the network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:same as ettv_tv_iptos, but affects packets for normal ET clients.&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User_talk:Deej&amp;diff=1583</id>
		<title>User talk:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User_talk:Deej&amp;diff=1583"/>
		<updated>2005-11-07T19:38:01Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You might want to use the preview button more often.  (&amp;quot;&amp;lt;[NW]reyalP&amp;gt; someone needs to hit deej with the preview stick&amp;quot;) --[[User:WeblionX|WeblionX]] 13:36, 5 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
I plead guilty to being a total Wikinub [[User:Deej|deej]] 14:14, 5 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
I&#039;m getting better at this preview stuff :D.&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=1582</id>
		<title>ETTV:Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=1582"/>
		<updated>2005-11-07T19:36:13Z</updated>

		<summary type="html">&lt;p&gt;Deej: clarity and typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;dot_graph&amp;gt;&lt;br /&gt;
digraph ettv {&lt;br /&gt;
master -&amp;gt; slave1&lt;br /&gt;
master -&amp;gt; slave2&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;client1..&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;..client50&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;client51..&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;..client100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dot_graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Master&amp;quot; (gameserver)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Start your gameserver as normal, but run ettv.x86 instead of etded.x86.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039; (default 0, no slave connections allowed)&lt;br /&gt;
:Number of ettv slaves allowed to connect.&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; Slave slots are always reserved, like private slots.&lt;br /&gt;
&#039;&#039;&#039;ettv_password&#039;&#039;&#039; (default &amp;quot;&amp;quot;, no slave connections allowed) &lt;br /&gt;
:Password for ettv slaves.&lt;br /&gt;
:Must be set, or no slaves will be able to connect!&lt;br /&gt;
&#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039; (default 1)&lt;br /&gt;
:1 = prevent slaves from being callvote kicked&lt;br /&gt;
:2 = grant shoutcaster status to slaves&lt;br /&gt;
:values can be added together, eg 3 for both features.&lt;br /&gt;
&lt;br /&gt;
===Playing on the master===&lt;br /&gt;
Players may now connect to your gameserver as normal.&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Slave&amp;quot; (broadcast server)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Copy tvgame.mp.i386.so to the same directory as your etpro/qagame.mp.i386.so is located.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&#039;&#039;&#039;sv_maxclients&#039;&#039;&#039;&lt;br /&gt;
:Number of spectator clients to allow. This number is only limited by available cpu and memory.&lt;br /&gt;
:Some guidelines when provisioning a broadcast server:&lt;br /&gt;
:*100 spectator slots will require ~ 128mb ram. Use com_hunkmegs to set this.&lt;br /&gt;
:*100 spectator slots will require ~ 768kbyte/sec (6mbits), roughly 6kbyte/sec per client&lt;br /&gt;
:*100 spectator slots will take ~ 80% cpu of a Xeon 2.2ghz&lt;br /&gt;
:*Each slave will require ~20-40kbyte/sec from the master.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_clientname&#039;&#039;&#039; (default &amp;quot;ETTV&amp;quot;)&lt;br /&gt;
:Playername the slave will use when connecting to the master, eg &amp;quot;ETTV-xyz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_delay&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of seconds for slave to delay the master feed. Recording/playback chains should no longer be needed, and slaves should always maintain an exact delay from the master server. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: this should ONLY be set on the slave.&lt;br /&gt;
:&#039;&#039;note&#039;&#039;: only supported in ettv beta8 and later&lt;br /&gt;
&lt;br /&gt;
===Chat passwords===&lt;br /&gt;
In order to curb the rampant abuse of ettv chat, admins may set &amp;quot;chat passwords&amp;quot; on their servers. If enabled, viewers are not allowed to chat unless they have a password. You can define as many passwords as you like, so you can easily track down individual abusers and limit the damage of stolen passwords.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpasswords&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of chat passwords defined.&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpassword&#039;&#039;&#039;(1-99999)&lt;br /&gt;
:individual chat passwords.&lt;br /&gt;
&lt;br /&gt;
viewers use &amp;lt;tt&amp;gt;/chatpassword &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;password&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; to login.&lt;br /&gt;
&lt;br /&gt;
if logged in, ettv chats will be tagged with a number in parentheses identifying which chat password the viewer is using. &lt;br /&gt;
===Misc commands for viewers===&lt;br /&gt;
;For ettv beta 4 and above&lt;br /&gt;
* spectators may &amp;lt;tt&amp;gt;/ignore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/unignore&amp;lt;/tt&amp;gt; other spectators&lt;br /&gt;
* &amp;lt;i&amp;gt;semiadmin&amp;lt;/i&amp;gt; functionality now works for slaves&lt;br /&gt;
* rcon may now mute/unmute specs &lt;br /&gt;
&lt;br /&gt;
===Connect the slave===&lt;br /&gt;
Now start your slave server by running ettv.x86&lt;br /&gt;
&lt;br /&gt;
Tell the slave server to connect up to the master server:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv connect master.ip.address:port &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;ettv_password&amp;lt;/b&amp;gt;(required)&amp;lt;/i&amp;gt; &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;g_password&amp;lt;/b&amp;gt;(if the master has a g_password set)&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have configured everything correctly, the slave should connect to the master.&lt;br /&gt;
Clients should now be able to connect to the slave and spectate the game in progress.&lt;br /&gt;
&lt;br /&gt;
This is a &amp;quot;live broadcast&amp;quot; with no delay.&lt;br /&gt;
&lt;br /&gt;
===Disconnect the slave===&lt;br /&gt;
To tell the slave to disconnect from the master:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv disconnect&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Slave Chaining===&lt;br /&gt;
&lt;br /&gt;
==== What is chaining and why chain slaves? ====&lt;br /&gt;
&lt;br /&gt;
ETTV allows chaining slaves together. This very neat feature lets you connect one ETTV slave to another ETTV slave that is broadcasting a match instead of directly to the game server hosting the match. Apart from the &amp;quot;w00t this is very cool&amp;quot; factor, why is this feature so important for admins? Basicly, working in a chained model allows to broadcast a match to a large number of spectators without too much hastle and too many risks for the master server.&lt;br /&gt;
&lt;br /&gt;
Chaining was developped for a simple reason: if you take into account that one ETTV slave connects at an &#039;&#039;&#039;unlimited&#039;&#039;&#039; rate to a master, you really don&#039;t want to connect 15 or 20 slaves to a game server to broadcast let&#039;s say the &#039;&#039;Atlantic Battle&#039;&#039;. Chances are you will bring down the master game server and thus the game. Chaining slaves firmly alleviates the load on the master game server. 2 or 4 of these &#039;&#039;Hubs&#039;&#039; can do the job of delaying the signal and feeding it to other slaves.&lt;br /&gt;
&lt;br /&gt;
Other benefits might include better network performance. If you can choose to either connect your slave to the game server where your connection is not optimal or to a nearby slave who is on a better connection to the master, it might help the quality of your broadcast. Plus you don&#039;t need to record anything when connecting to a delayed slave.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your slave to allow connections from other slaves ====&lt;br /&gt;
&lt;br /&gt;
This part is actually pretty easy. You need to set up your slave as if you were setting up a master game server. This means that, next to the normal slave parameters, you have to set up the following:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039;: set this to at least 1&lt;br /&gt;
* &#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039;: set this to at least 1. Depending on how powerful your machine is you can set this number higher. Don&#039;t set it too high though, a slave still connects at an unlimited rate&lt;br /&gt;
* &#039;&#039;&#039;set ettv_password&#039;&#039;&#039;: set to something else than &amp;quot;&amp;quot;. This password is needed by the slaves connecting to your slave (together with g_password of course)&lt;br /&gt;
&lt;br /&gt;
Other settings such as ettv_netblast, ettv_tv_iptos etc... can be set as well. You can even use autorecord if you wish, or just add an extra delay.&lt;br /&gt;
&lt;br /&gt;
==== Pitfalls ====&lt;br /&gt;
&lt;br /&gt;
There are however a few risks associated with slave chaining. One of the biggest issues is &#039;&#039;&#039;PK3 dependancies&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As you know, a slave needs to have at least all the PK3s of the server it connects too. But a slave can have more PK3s installed, as long as it has the ones on the server&#039;s pure list. This is what complicates things! The further you go down the &amp;quot;chain&amp;quot;, the more the chances exist of PK3 pollution, which makes the job of the last slave very hard. And the viewers connecting to that slave will not be very happy either.&lt;br /&gt;
&lt;br /&gt;
So for those of you venturing into chaining slaves here&#039;s a rule of thumb: &#039;&#039;&#039;always keep the installed PK3s to the bare minimum&#039;&#039;&#039;! Do not add stuff you do not need. If you want to know what PK3s you need and not need, connect your slave to the master or the hub, see which PK3s are on the pure list and rename or remove the PK3s that are not on the list. You will make your viewers and other admins connecting to your slave very happy.&lt;br /&gt;
&lt;br /&gt;
Another risk could be &#039;&#039;&#039;chained lag&#039;&#039;&#039;. If one of the slaves that is higher in the chain starts lagging, the consequenses for the slaves depending on it will be seen immedeatily. So if you offer to be one of the higher slaves in the chain, make sure your machine can handle it! An ETTV chain is much like the food chain ;-).&lt;br /&gt;
&lt;br /&gt;
==== Admin contributions ====&lt;br /&gt;
&lt;br /&gt;
If by now you feel like getting your hands dirty in ETTV chaining madness and you want to see some example of hubs, slaves, broadcasters and scripts to get it all working, you can already start by checking out [[User:Deej|deej&#039;s page]].&lt;br /&gt;
&lt;br /&gt;
==ETTV Demos==&lt;br /&gt;
You may record the match in progress to a file, with the command:&lt;br /&gt;
:&amp;lt;tt&amp;gt;record &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
If you omit the demo name, ettv will start recording using a filename of demoXXXX where XXXX is the first available number starting from 0000.&lt;br /&gt;
&lt;br /&gt;
Demos will stop recording when a map changes.&lt;br /&gt;
&lt;br /&gt;
To stop recording a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;stoprecord&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To play back a recorded demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of an ettv slave:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv status&amp;lt;/tt&amp;gt;&lt;br /&gt;
This will tell you if the slave is connected to a master, or if it is currently playing back a demo.&lt;br /&gt;
&lt;br /&gt;
To fastforward a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;ff &amp;lt;i&amp;gt;&amp;lt;seconds&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
Eg &amp;lt;tt&amp;gt;ff 30&amp;lt;/tt&amp;gt; will fast foward 30 seconds. Fast forward stops at map restarts, so you can safely ff 999 to fast forward through a warmup. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: requires ettv beta 7 or later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Autorecording demos===&lt;br /&gt;
ettv is able to automatically continuously record demos, creating new demofiles when the map changes. To do this, set the cvar ettv_autorecord to 1. ettv will start recording demos with the name demoXXXX where XXXX is a number starting at 0000 and incrementing on each map change.&lt;br /&gt;
&lt;br /&gt;
Server admins may find it useful to use the demo recording feature of ettv to record matches, instead of requiring individual players to record them. An ettv demo records everything that happens on a server, including all player viewpoints.&lt;br /&gt;
&lt;br /&gt;
===How to create demo based delayed feeds===&lt;br /&gt;
Autorecording demos is the first half of the process for delayed feeds. Typically you would run a passworded slave server with the smallest number of sv_maxclients possible. No spectators should connect to this server. The only purpose of this slave is to connect up to the master and record the match to sequentially numbered demofiles.&lt;br /&gt;
&lt;br /&gt;
Now start up a slave, and tell it to broadcast the demo being recorded.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo demo0000&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wait approx. 60 seconds after the master begins recording before issuing this command to your slaves, then you have a 60 second delay on your broadcast.&lt;br /&gt;
&lt;br /&gt;
If you want slaves to automatically switch to the next demo when the end of the demo is reached (eg on a map change), you would set the cvar ettv_autoplay to 1. If a slave is playing demo0000 and it reaches the end, it will then try to play demo0001 and so on.&lt;br /&gt;
&lt;br /&gt;
Disadvantage of this method: It is not automated in ettv itself, though admins can script it.&lt;br /&gt;
Advantage of this method: You may run multiple broadcast servers from the same single demo stream.&lt;br /&gt;
&lt;br /&gt;
Automated delayed feeds are supported in ettv beta 8. See the above.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* The slave server must be running the same fs_game setting as the master server.&lt;br /&gt;
* The slave server must have a copy of every map pk3 the master server is using.&lt;br /&gt;
* If the master server loads a map the slave server doesn&#039;t have, the slave will get stuck.&lt;br /&gt;
* Spectators will be forced to download any custom pk3 you are using.&lt;br /&gt;
* It is a good idea to keep the master server pk3 list to a minimum.&lt;br /&gt;
* If you are using the autorecord/autoplay feature for running delayed feeds, you will usually want to make sure you clear out the demos directory first. Autorecording will start numbering demofiles using the first available number, so if you have old recorded demos then ettv might start recording from eg demo0017. If your scripts expect to start playback from demo0000 then you might end up broadcasting a game recorded at some earlier date...&lt;br /&gt;
&lt;br /&gt;
==Miscellaneous==&lt;br /&gt;
&lt;br /&gt;
Slaves may send chats to the master with the command msay&lt;br /&gt;
Slaves may list players on the master with the command players&lt;br /&gt;
&lt;br /&gt;
==Performance tuning==&lt;br /&gt;
&lt;br /&gt;
Spectator servers with large numbers of clients (eg &amp;gt;100) will push the OS very hard with huge amounts of UDP traffic. The default OS buffer settings for Linux are inadequate and can hurt performance, causing lag and/or disconnects.&lt;br /&gt;
&lt;br /&gt;
If you get messages like&lt;br /&gt;
:&amp;lt;tt&amp;gt;NET_SendPacket ERROR: No buffer space available to 192.168.120.142:27960&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you definitely need to increase your kernel network buffers.&lt;br /&gt;
&lt;br /&gt;
Large spectator servers should increase the kernel buffers.&lt;br /&gt;
&lt;br /&gt;
The following commands should be issued as root on linux:&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FreeBSD can try this:&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.recvspace=65535&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.maxdgram=57344&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w kern.ipc.maxsockbuf=8388608&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Network tuning cvars===&lt;br /&gt;
;The following are only available in ettv beta 7 and later.&lt;br /&gt;
By default, et uses small packets of 1400 bytes or less to send to clients. If messages need to be larger, they are &#039;fragmented&#039; and sent over several server frames. ettv slave messages tend to be large and often fragment. ettv normally tries to send slaves all fragments at once to avoid jittery playback, but some networks / OSes handle this badly. ettv beta 7 introduces new controls so admins can optimize ettv for their individual network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_netblast&#039;&#039;&#039; (default 1)&lt;br /&gt;
:by default, ettv tries to send all fragments at once. some networks may handle this badly. setting this to 0 disables. warning: setting this to 0 without increasing ettv_mtu will result in severely laggy slave playback.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_mtu&#039;&#039;&#039; (default 1400)&lt;br /&gt;
:; master only&lt;br /&gt;
:if your network / os supports it, you can set this to large values (eg 16000) to prevent message fragmentation and provide smoother ettv links. this cvar has no effect on normal ET clients. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: ettv_mtu must currently be set from commandline, it cannot be changed on the fly (yet).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_tv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:you can set the ip type of service field of ettv link packets. if your network/ISP supports it, you can use a value like 16 (&amp;quot;minimize delay&amp;quot;) to prioritize ettv link packets over others on the network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:same as ettv_tv_iptos, but affects packets for normal ET clients.&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=1581</id>
		<title>ETTV:Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=ETTV:Server_Configuration&amp;diff=1581"/>
		<updated>2005-11-07T19:32:42Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Slave Chaining */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;dot_graph&amp;gt;&lt;br /&gt;
digraph ettv {&lt;br /&gt;
master -&amp;gt; slave1&lt;br /&gt;
master -&amp;gt; slave2&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;client1..&amp;quot;&lt;br /&gt;
slave1 -&amp;gt; &amp;quot;..client50&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;client51..&amp;quot;&lt;br /&gt;
slave2 -&amp;gt; &amp;quot;..client100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dot_graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Master&amp;quot; (gameserver)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Start your gameserver as normal, but run ettv.x86 instead of etded.x86.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039; (default 0, no slave connections allowed)&lt;br /&gt;
:Number of ettv slaves allowed to connect.&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; Slave slots are always reserved, like private slots.&lt;br /&gt;
&#039;&#039;&#039;ettv_password&#039;&#039;&#039; (default &amp;quot;&amp;quot;, no slave connections allowed) &lt;br /&gt;
:Password for ettv slaves.&lt;br /&gt;
:Must be set, or no slaves will be able to connect!&lt;br /&gt;
&#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039; (default 1)&lt;br /&gt;
:1 = prevent slaves from being callvote kicked&lt;br /&gt;
:2 = grant shoutcaster status to slaves&lt;br /&gt;
:values can be added together, eg 3 for both features.&lt;br /&gt;
&lt;br /&gt;
===Playing on the master===&lt;br /&gt;
Players may now connect to your gameserver as normal.&lt;br /&gt;
&lt;br /&gt;
==Installation - &amp;quot;Slave&amp;quot; (broadcast server)==&lt;br /&gt;
&lt;br /&gt;
Copy ettv.x86 to the same directory your etded.x86 is located.&lt;br /&gt;
Copy tvgame.mp.i386.so to the same directory as your etpro/qagame.mp.i386.so is located.&lt;br /&gt;
&lt;br /&gt;
===Set some cvars===&lt;br /&gt;
&#039;&#039;&#039;sv_maxclients&#039;&#039;&#039;&lt;br /&gt;
:Number of spectator clients to allow. This number is only limited by available cpu and memory.&lt;br /&gt;
:Some guidelines when provisioning a broadcast server:&lt;br /&gt;
:*100 spectator slots will require ~ 128mb ram. Use com_hunkmegs to set this.&lt;br /&gt;
:*100 spectator slots will require ~ 768kbyte/sec (6mbits), roughly 6kbyte/sec per client&lt;br /&gt;
:*100 spectator slots will take ~ 80% cpu of a Xeon 2.2ghz&lt;br /&gt;
:*Each slave will require ~20-40kbyte/sec from the master.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_clientname&#039;&#039;&#039; (default &amp;quot;ETTV&amp;quot;)&lt;br /&gt;
:Playername the slave will use when connecting to the master, eg &amp;quot;ETTV-xyz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_delay&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of seconds for slave to delay the master feed. Recording/playback chains should no longer be needed, and slaves should always maintain an exact delay from the master server. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: this should ONLY be set on the slave.&lt;br /&gt;
:&#039;&#039;note&#039;&#039;: only supported in ettv beta8 and later&lt;br /&gt;
&lt;br /&gt;
===Chat passwords===&lt;br /&gt;
In order to curb the rampant abuse of ettv chat, admins may set &amp;quot;chat passwords&amp;quot; on their servers. If enabled, viewers are not allowed to chat unless they have a password. You can define as many passwords as you like, so you can easily track down individual abusers and limit the damage of stolen passwords.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpasswords&#039;&#039;&#039; (default 0, disabled)&lt;br /&gt;
:number of chat passwords defined.&lt;br /&gt;
&#039;&#039;&#039;ettv_chatpassword&#039;&#039;&#039;(1-99999)&lt;br /&gt;
:individual chat passwords.&lt;br /&gt;
&lt;br /&gt;
viewers use &amp;lt;tt&amp;gt;/chatpassword &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;password&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/tt&amp;gt; to login.&lt;br /&gt;
&lt;br /&gt;
if logged in, ettv chats will be tagged with a number in parentheses identifying which chat password the viewer is using. &lt;br /&gt;
===Misc commands for viewers===&lt;br /&gt;
;For ettv beta 4 and above&lt;br /&gt;
* spectators may &amp;lt;tt&amp;gt;/ignore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/unignore&amp;lt;/tt&amp;gt; other spectators&lt;br /&gt;
* &amp;lt;i&amp;gt;semiadmin&amp;lt;/i&amp;gt; functionality now works for slaves&lt;br /&gt;
* rcon may now mute/unmute specs &lt;br /&gt;
&lt;br /&gt;
===Connect the slave===&lt;br /&gt;
Now start your slave server by running ettv.x86&lt;br /&gt;
&lt;br /&gt;
Tell the slave server to connect up to the master server:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv connect master.ip.address:port &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;ettv_password&amp;lt;/b&amp;gt;(required)&amp;lt;/i&amp;gt; &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;g_password&amp;lt;/b&amp;gt;(if the master has a g_password set)&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have configured everything correctly, the slave should connect to the master.&lt;br /&gt;
Clients should now be able to connect to the slave and spectate the game in progress.&lt;br /&gt;
&lt;br /&gt;
This is a &amp;quot;live broadcast&amp;quot; with no delay.&lt;br /&gt;
&lt;br /&gt;
===Disconnect the slave===&lt;br /&gt;
To tell the slave to disconnect from the master:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv disconnect&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Slave Chaining===&lt;br /&gt;
&lt;br /&gt;
==== What is chaining and why chain slaves? ====&lt;br /&gt;
&lt;br /&gt;
ETTV allows chaining slaves together. This very neat feature let&#039;s you connect one ETTV slave to another ETTV slave that is broadcasting a match instead of directly to the game server hosting the match. Apart from the &amp;quot;wow this is very cool&amp;quot; factor, why is this feature so important for admins? Basicly, working in a chained model allows to broadcast a match to a large number of spectators without too much hastle and too many risks for the master server.&lt;br /&gt;
&lt;br /&gt;
If you take into account that one ETTV slave connects at an &#039;&#039;&#039;unlimited&#039;&#039;&#039; rate to a master, you really don&#039;t want to connect 15 or 20 slaves to a game server to broadcast let&#039;s say the Atlantic Battle. Chances are you will bring down the master game server and thus the game. Chaining slaves firmly alleviates the load on the master game server. 2 or 4 of these &#039;&#039;Hubs&#039;&#039; can do the job of delaying the signal and feeding it to other slaves.&lt;br /&gt;
&lt;br /&gt;
Other benefits might include better network performance. If you can choose to either connect your slave to the game server where your connection is not optimal or to a nearby slave who is on a better connection to the master, it might help the quality of your broadcast. Plus you don&#039;t need to record anything when connecting to a delayed slave.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your slave to allow connections from other slaves ====&lt;br /&gt;
&lt;br /&gt;
This part is actually pretty easy. You need to set up your slave as if you were setting up a master game server. This means that, next to the normal slave parameters, you have to set up the following:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;b_ettv_flags&#039;&#039;&#039;: set this to at least 1&lt;br /&gt;
* &#039;&#039;&#039;ettv_sv_maxslaves&#039;&#039;&#039;: set this to at least 1. Depending on how powerful your machine is you can set this number higher. Don&#039;t set it too high though, a slave still connects at an unlimited rate&lt;br /&gt;
* &#039;&#039;&#039;set ettv_password&#039;&#039;&#039;: set to something else than &amp;quot;&amp;quot;. This password is needed by the slaves connecting to your slave (together with g_password of course)&lt;br /&gt;
&lt;br /&gt;
Other settings such as ettv_netblast, ettv_tv_iptos etc... can be set as well. You can even use autorecord if you wish, or just add an extra delay.&lt;br /&gt;
&lt;br /&gt;
==== Pitfalls ====&lt;br /&gt;
&lt;br /&gt;
There are however a few risks associated with slave chaining. One of the biggest issues is &#039;&#039;&#039;PK3 dependancies&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As you know, a slave needs to have at least all the PK3s of the server it connects too. But a slave can have more PK3s installed, as long as it has the ones on the server&#039;s pure list. This is what complicates things! The further you go down the &amp;quot;chain&amp;quot;, the more the chances exist of PK3 pollution, which makes the job of the last slave very hard. And the viewers connecting to that slave will not be very happy either.&lt;br /&gt;
&lt;br /&gt;
So for those of you venturing into chaining slaves here&#039;s a rule of thumb: &#039;&#039;&#039;always keep the installed PK3s to the bare minimum&#039;&#039;&#039;! Do not add stuff you do not need. If you want to know what PK3s you need and not need, connect your slave to the master or the hub, see which PK3s are on the pure list and rename or remove the PK3s that are not on the list. You will make your viewers and other admins connecting to your slave very happy.&lt;br /&gt;
&lt;br /&gt;
Another risk could be &#039;&#039;&#039;chained lag&#039;&#039;&#039;. If one of the slaves that is higher in the chain starts lagging, the consequenses for the slaves depending on it will be seen immedeatily. So if you offer to be one of the higher slaves in the chain, make sure your machine can handle it! An ETTV chain is much like the food chain ;-).&lt;br /&gt;
&lt;br /&gt;
==== Admin contributions ====&lt;br /&gt;
&lt;br /&gt;
If by now you feel like getting your hands dirty in ETTV chaining madness and you want to see some example of hubs, slaves, broadcasters and scripts to get it all working, you can already start by checking out [[User:Deej|deej&#039;s page]].&lt;br /&gt;
&lt;br /&gt;
==ETTV Demos==&lt;br /&gt;
You may record the match in progress to a file, with the command:&lt;br /&gt;
:&amp;lt;tt&amp;gt;record &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
If you omit the demo name, ettv will start recording using a filename of demoXXXX where XXXX is the first available number starting from 0000.&lt;br /&gt;
&lt;br /&gt;
Demos will stop recording when a map changes.&lt;br /&gt;
&lt;br /&gt;
To stop recording a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;stoprecord&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To play back a recorded demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo &amp;lt;&#039;&#039;&#039;demo name&#039;&#039;&#039;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of an ettv slave:&lt;br /&gt;
:&amp;lt;tt&amp;gt;tv status&amp;lt;/tt&amp;gt;&lt;br /&gt;
This will tell you if the slave is connected to a master, or if it is currently playing back a demo.&lt;br /&gt;
&lt;br /&gt;
To fastforward a demo:&lt;br /&gt;
:&amp;lt;tt&amp;gt;ff &amp;lt;i&amp;gt;&amp;lt;seconds&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
Eg &amp;lt;tt&amp;gt;ff 30&amp;lt;/tt&amp;gt; will fast foward 30 seconds. Fast forward stops at map restarts, so you can safely ff 999 to fast forward through a warmup. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: requires ettv beta 7 or later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Autorecording demos===&lt;br /&gt;
ettv is able to automatically continuously record demos, creating new demofiles when the map changes. To do this, set the cvar ettv_autorecord to 1. ettv will start recording demos with the name demoXXXX where XXXX is a number starting at 0000 and incrementing on each map change.&lt;br /&gt;
&lt;br /&gt;
Server admins may find it useful to use the demo recording feature of ettv to record matches, instead of requiring individual players to record them. An ettv demo records everything that happens on a server, including all player viewpoints.&lt;br /&gt;
&lt;br /&gt;
===How to create demo based delayed feeds===&lt;br /&gt;
Autorecording demos is the first half of the process for delayed feeds. Typically you would run a passworded slave server with the smallest number of sv_maxclients possible. No spectators should connect to this server. The only purpose of this slave is to connect up to the master and record the match to sequentially numbered demofiles.&lt;br /&gt;
&lt;br /&gt;
Now start up a slave, and tell it to broadcast the demo being recorded.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;demo demo0000&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wait approx. 60 seconds after the master begins recording before issuing this command to your slaves, then you have a 60 second delay on your broadcast.&lt;br /&gt;
&lt;br /&gt;
If you want slaves to automatically switch to the next demo when the end of the demo is reached (eg on a map change), you would set the cvar ettv_autoplay to 1. If a slave is playing demo0000 and it reaches the end, it will then try to play demo0001 and so on.&lt;br /&gt;
&lt;br /&gt;
Disadvantage of this method: It is not automated in ettv itself, though admins can script it.&lt;br /&gt;
Advantage of this method: You may run multiple broadcast servers from the same single demo stream.&lt;br /&gt;
&lt;br /&gt;
Automated delayed feeds are supported in ettv beta 8. See the above.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* The slave server must be running the same fs_game setting as the master server.&lt;br /&gt;
* The slave server must have a copy of every map pk3 the master server is using.&lt;br /&gt;
* If the master server loads a map the slave server doesn&#039;t have, the slave will get stuck.&lt;br /&gt;
* Spectators will be forced to download any custom pk3 you are using.&lt;br /&gt;
* It is a good idea to keep the master server pk3 list to a minimum.&lt;br /&gt;
* If you are using the autorecord/autoplay feature for running delayed feeds, you will usually want to make sure you clear out the demos directory first. Autorecording will start numbering demofiles using the first available number, so if you have old recorded demos then ettv might start recording from eg demo0017. If your scripts expect to start playback from demo0000 then you might end up broadcasting a game recorded at some earlier date...&lt;br /&gt;
&lt;br /&gt;
==Miscellaneous==&lt;br /&gt;
&lt;br /&gt;
Slaves may send chats to the master with the command msay&lt;br /&gt;
Slaves may list players on the master with the command players&lt;br /&gt;
&lt;br /&gt;
==Performance tuning==&lt;br /&gt;
&lt;br /&gt;
Spectator servers with large numbers of clients (eg &amp;gt;100) will push the OS very hard with huge amounts of UDP traffic. The default OS buffer settings for Linux are inadequate and can hurt performance, causing lag and/or disconnects.&lt;br /&gt;
&lt;br /&gt;
If you get messages like&lt;br /&gt;
:&amp;lt;tt&amp;gt;NET_SendPacket ERROR: No buffer space available to 192.168.120.142:27960&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you definitely need to increase your kernel network buffers.&lt;br /&gt;
&lt;br /&gt;
Large spectator servers should increase the kernel buffers.&lt;br /&gt;
&lt;br /&gt;
The following commands should be issued as root on linux:&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/rmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;echo &amp;quot;524288&amp;quot; &amp;gt; /proc/sys/net/core/wmem_max&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FreeBSD can try this:&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.recvspace=65535&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w net.inet.udp.maxdgram=57344&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;sysctl -w kern.ipc.maxsockbuf=8388608&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Network tuning cvars===&lt;br /&gt;
;The following are only available in ettv beta 7 and later.&lt;br /&gt;
By default, et uses small packets of 1400 bytes or less to send to clients. If messages need to be larger, they are &#039;fragmented&#039; and sent over several server frames. ettv slave messages tend to be large and often fragment. ettv normally tries to send slaves all fragments at once to avoid jittery playback, but some networks / OSes handle this badly. ettv beta 7 introduces new controls so admins can optimize ettv for their individual network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_netblast&#039;&#039;&#039; (default 1)&lt;br /&gt;
:by default, ettv tries to send all fragments at once. some networks may handle this badly. setting this to 0 disables. warning: setting this to 0 without increasing ettv_mtu will result in severely laggy slave playback.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_mtu&#039;&#039;&#039; (default 1400)&lt;br /&gt;
:; master only&lt;br /&gt;
:if your network / os supports it, you can set this to large values (eg 16000) to prevent message fragmentation and provide smoother ettv links. this cvar has no effect on normal ET clients. &lt;br /&gt;
:&#039;&#039;note&#039;&#039;: ettv_mtu must currently be set from commandline, it cannot be changed on the fly (yet).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_tv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:you can set the ip type of service field of ettv link packets. if your network/ISP supports it, you can use a value like 16 (&amp;quot;minimize delay&amp;quot;) to prioritize ettv link packets over others on the network.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ettv_sv_iptos&#039;&#039;&#039; (default 0)&lt;br /&gt;
:same as ettv_tv_iptos, but affects packets for normal ET clients.&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=Server_Configuration&amp;diff=1580</id>
		<title>Server Configuration</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=Server_Configuration&amp;diff=1580"/>
		<updated>2005-11-07T18:51:31Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Installation==&lt;br /&gt;
File installation:&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;etpro&amp;lt;/tt&amp;gt; directory should be in the same directory as &amp;lt;tt&amp;gt;etmain&amp;lt;/tt&amp;gt;.  &amp;lt;i&amp;gt;Do &amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; extract the files to etmain&amp;lt;/i&amp;gt;&lt;br /&gt;
:Linux:&lt;br /&gt;
Unzip the server archive to &amp;lt;tt&amp;gt;enemy-territory/etpro/&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Windows:&lt;br /&gt;
Unzip the server archive to &amp;lt;tt&amp;gt;Wolfenstein - Enemy Territory\etpro&amp;lt;/tt&amp;gt;&lt;br /&gt;
Starting an ETPro server requires &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt; to be appended to the end of the command line.&lt;br /&gt;
:Linux example:&lt;br /&gt;
::&amp;lt;tt&amp;gt;  ./etded +set fs_game etpro&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Windows:&lt;br /&gt;
::&amp;lt;tt&amp;gt;  etded.exe +set fs_game etpro&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Windows Shortcut:&lt;br /&gt;
::Right click on the shortcut for Enemy Territory and select &amp;quot;Properties.&amp;quot; In the &amp;quot;Target&amp;quot; Box (Top text box) add &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt; to the end, after the quotes.&lt;br /&gt;
::&amp;lt;tt&amp;gt;  &amp;quot;C:\Program Files\Wolfenstein - Enemy Territory\et.exe&amp;quot; +set fs_game etpro&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: Starting from version ET 2.60, the Windows executables are et.exe for the game and etded.exe for the client. If you want to run a listen server on Windows start your game with et.exe, otherwise use etded.exe.&lt;br /&gt;
&lt;br /&gt;
If you want to run 2.56 or earlier servers on Windows, you can only use et.exe and append &amp;lt;tt&amp;gt;+set dedicated 1&amp;lt;/tt&amp;gt; (or 2).&lt;br /&gt;
&lt;br /&gt;
==Warnings==&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;WARNING: Server improperly installed! Incorrect fs_game setting! Please notify administrator.&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:Incorrect &amp;lt;tt&amp;gt;+set fs_game&amp;lt;/tt&amp;gt; string.  Make sure it is set to &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;fs_game is write protected.&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:You must start your server via the command line (Or by changing the shortcut) with the &amp;lt;tt&amp;gt;+set fs_game etpro&amp;lt;/tt&amp;gt; command.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Client .pk3 missing!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:The PK3 file that is contained in the server install file is missing.  Download the [http://bani.anime.net/etpro/download.html server install] again and place the PK3 file in the server&#039;s ETPro directory.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Incorrect client .pk3 installed on server!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:The PK3 file mentioned above does not match the version of the server.  Download the PK3 (And possibly updated server) from the [http://bani.anime.net/etpro/download.html download page].&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Multiple client .pk3 versions installed on server!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:This means that the server has more than one ETPro client PK3.  Remove the older versions from the server&#039;s ETPro directory.&lt;br /&gt;
:This can also happen from having fs_game set twice in your shortcut or config.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Incorrect ET version!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:This happens when you are attempting to install ETPro on a non-patched ET server.  Download the [http://games.activision.com/games/wolfenstein patch] and try again.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Cvar dedicated is 0! Some features will break!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:ETPro is meant to be installed on a dedicated server.  Set the server to dedicated by using &amp;lt;tt&amp;gt;+set dedicated 2&amp;lt;/tt&amp;gt; in the command-line used to start the server.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;etpro_cheats.dat is corrupt or missing!&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
:The ETPro database file for positively identifying cheats has either been corrupted or does not exist on the server.  Download a recent version of [http://etpro.anime.net/etpro_cheats.dat the database].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Other Errors==&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;Server sends users the ETPro PK3 file over and over.&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:If you are using download redirects, make sure that the download path is set correctly if changed between versions.  eg: If the old PK3 was in &amp;lt;tt&amp;gt;server/etpro2&amp;lt;/tt&amp;gt; and the new version is in &amp;lt;tt&amp;gt;server/etpro3&amp;lt;/tt&amp;gt; and the redirect path in the server configuration was not changed, it would send the old ETPro 2.x files; which not being what the server is using, it would cause the download to start again.&amp;lt;br&amp;gt;&lt;br /&gt;
:If you are redirecting to an http or ftp server, make sure the pk3 on the http/ftp server exactly matches the pk3 on the game server.&lt;br /&gt;
:Some http servers may incorrectly try to send pk3 files as text/plain, which will corrupt downloads. Make sure they are sent as application/octet-stream:&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;*WARNING*: PunkBuster Reports PB Server Running Old Version Cx.xxx&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Windows:&lt;br /&gt;
:Run &amp;lt;tt&amp;gt;\Wolfenstein - Enemy territory\pb\pbweb.exe&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Linux:&lt;br /&gt;
:Run &amp;lt;tt&amp;gt;/path_to_et_server/pb/pbweb.x86&amp;lt;/tt&amp;gt; (first chmod +x pbweb.x86)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configuration:==&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;[http://bani.anime.net/banimod/forums/viewforum.php?f=13 Server Admin Forums]&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other Resources==&lt;br /&gt;
[http://rtcw.jolt.co.uk/content/enemy_territory/server_guide/index.html DG&#039;s excellent server guide]&lt;br /&gt;
[[Category:ETPro]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1576</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1576"/>
		<updated>2005-11-07T08:11:11Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Can be increased to avoid fragmentation&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 00:04, 7 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1575</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1575"/>
		<updated>2005-11-07T08:04:51Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Can be increased to avoid fragmentation&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 00:04, 7 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Category:ETTV:Server Configuration]]&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1566</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1566"/>
		<updated>2005-11-06T14:43:33Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Terminology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcast:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Can be increased to avoid fragmentation&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 06:42, 6 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1565</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1565"/>
		<updated>2005-11-06T14:42:34Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a competition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Can be increased to avoid fragmentation&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[put_your_pass_here]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[put_your_pass_here]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 06:42, 6 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User_talk:Deej&amp;diff=1551</id>
		<title>User talk:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User_talk:Deej&amp;diff=1551"/>
		<updated>2005-11-05T22:14:16Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You might want to use the preview button more often.  (&amp;quot;&amp;lt;[NW]reyalP&amp;gt; someone needs to hit deej with the preview stick&amp;quot;) --[[User:WeblionX|WeblionX]] 13:36, 5 November 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
I plead guilty to being a total Wikinub [[User:Deej|deej]] 14:14, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1550</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1550"/>
		<updated>2005-11-05T22:08:02Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1548</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1548"/>
		<updated>2005-11-05T20:27:28Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Hub script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;			# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Only increase when ettv_netblast is 0&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME\&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[putyourpasshere]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 12:23, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1547</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1547"/>
		<updated>2005-11-05T20:25:24Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Old school record / playback script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Only increase when ettv_netblast is 0&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME\&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. However, YMMV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[putyourpasshere]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 12:23, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1546</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1546"/>
		<updated>2005-11-05T20:24:35Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Old school record / playback script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Only increase when ettv_netblast is 0&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME\&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. YMMV.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[putyourpasshere]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 12:23, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1545</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1545"/>
		<updated>2005-11-05T20:24:15Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Old school record / playback script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Only increase when ettv_netblast is 0&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME\&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the recorder&#039;s log, &#039;&#039;which makes broadcasting very hard to debug&#039;&#039; :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. YMMV.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[putyourpasshere]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 12:23, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1544</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1544"/>
		<updated>2005-11-05T20:23:25Z</updated>

		<summary type="html">&lt;p&gt;Deej: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Only increase when ettv_netblast is 0&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME\&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old school record / playback script ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a script to broadcast a game the old-fashioned way. It records a demo and starts playing it back after roughly 60 seconds. There&#039;s some symbolic linking stuff done inside to make sure it stores all the logs, otherwise the &#039;broadcaster&#039; would override the &#039;recorder&#039;&#039;s log, which makes it hard to debug :-)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy / paste this script and save it as &amp;lt;code&amp;gt;broadcast.sh&amp;lt;/code&amp;gt; or any other name you prefer. The usual comments on quit and 999 are applicable here as well. This script &amp;quot;should&amp;quot; work with ETTV earlier then b8. YMMV.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#            reT!reD.ettv delayed broadcast script              #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where viewers connect directly to the broadcaster.           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemons in different screens         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r recorder&amp;quot;             #&lt;br /&gt;
#  or &amp;quot;screen -r broadcaster&amp;quot;.                                  #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                       START Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do&lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`			# Today&#039;s date for creating the subdir&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;		# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[get_pass_from_admin]&amp;quot;		# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP				# This host is Webperoni&lt;br /&gt;
RECORDER_PORT=&amp;quot;44999&amp;quot;				# Port of the private recorder&lt;br /&gt;
BROADCASTER_PORT=&amp;quot;27960&amp;quot;			# Port of the public broadcaster&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7recorder ^1#^71&amp;quot;&lt;br /&gt;
BROADCASTER_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^71&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$BROADCASTER_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
RCON_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
RECORDER_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_PASS=&amp;quot;[putyourpasshere]&amp;quot;&lt;br /&gt;
BROADCASTER_PASS=&amp;quot;[putyourpasshere]&amp;quot;		# Issue /rcon g_password &amp;quot;&amp;quot; for opening it up to the crowd&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_brc&amp;quot;		# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
BROADCASTER_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
BROADCASTER_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.org&amp;quot;		# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                        STOP Modifying                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
RECORDER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/recorder&amp;quot;&lt;br /&gt;
BROADCASTER_HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE/broadcaster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RECORDER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 1 \&lt;br /&gt;
+map oasis \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $RECORDER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $RECORDER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $RECORDER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_hostname $RECORDER_HOSTNAME \&lt;br /&gt;
+set sv_maxclients 4 \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload 0 \&lt;br /&gt;
+set sv_wwwDownload 0 \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;recorder.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves 2 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_delay 1 \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BROADCASTER_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $BROADCASTER_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $BROADCASTER_HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 160 \&lt;br /&gt;
+set sv_maxclients $BROADCASTER_SLOTS \&lt;br /&gt;
+set sv_privateclients $BROADCASTER_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $BROADCASTER_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $BROADCASTER_HOSTNAME \&lt;br /&gt;
+set g_password $BROADCASTER_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;broadcaster.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set ettv_autoplay 1 \&lt;br /&gt;
+set ettv_password $BROADCASTER_ETTV_PASS \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_sv_maxslaves $BROADCASTER_ETTV_SLAVES \&lt;br /&gt;
+demo demo0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
broadcast_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -e &amp;quot;\n&amp;quot;&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $RECORDER_HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Recorder: &amp;quot;&lt;br /&gt;
	screen -dmS recorder su -m -c &amp;quot;$DAEMON $RECORDER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo &amp;quot;done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\n\nSleeping for $SHOUTCAST_DELAY seconds.&amp;quot;&lt;br /&gt;
	sleep $SHOUTCAST_DELAY&lt;br /&gt;
	&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	mkdir &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	ln -s &amp;quot;$RECORDER_HOMEPATH/etpro/demos&amp;quot; &amp;quot;$BROADCASTER_HOMEPATH/etpro&amp;quot;&lt;br /&gt;
	chown -R $USER &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
	chmod -R 775 &amp;quot;$BROADCASTER_HOMEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Broadcaster: &amp;quot;&lt;br /&gt;
	screen -dmS broadcaster su -m -c &amp;quot;$DAEMON $BROADCASTER_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PIDs...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Recorder has PID &amp;quot;&lt;br /&gt;
	echo -n $RECORDER_PID&lt;br /&gt;
	echo -e &amp;quot;.\n\nBroadcaster has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$BROADCASTER_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
broadcast_stop (){&lt;br /&gt;
&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Broadcaster: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $BROADCASTER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $BROADCASTER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nBroadcaster wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Recorder: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $RECORDER_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $RECORDER_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nRecorder wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
	clean_up&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
		rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
		ls -l --color=always $BASEPATH&lt;br /&gt;
		;;&lt;br /&gt;
		*)&lt;br /&gt;
		echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
		ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
		;;&lt;br /&gt;
	esac	&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# Pulling some very ugly tricks here&lt;br /&gt;
	#&lt;br /&gt;
	RECORDER_PID=`ps aux|grep &amp;quot;+set net_port $RECORDER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;\|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
	BROADCASTER_PID=`ps aux|grep &amp;quot;+set net_port $BROADCASTER_PORT&amp;quot;|grep -v &amp;quot;su -m -c&amp;quot;|grep -v &amp;quot;SCREEN -dmS&amp;quot;|awk &#039;{ print $1 $2 }&#039;|tr -d &amp;quot;$USER&amp;quot;`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		broadcast_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		broadcast_stop&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 12:23, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1543</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1543"/>
		<updated>2005-11-05T20:01:41Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Some scripts I use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Only increase when ettv_netblast is 0&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME\&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 11:52, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
	<entry>
		<id>https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1542</id>
		<title>User:Deej</title>
		<link rel="alternate" type="text/html" href="https://wolfwiki.anime.net/index.php?title=User:Deej&amp;diff=1542"/>
		<updated>2005-11-05T20:00:41Z</updated>

		<summary type="html">&lt;p&gt;Deej: /* Deej&amp;#039;s proposition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.fragland.org/deej/572.gif&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Guilty for founding the [http://www.fragland.org Retired Old Farts] which provide:&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPro servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETTV servers&amp;lt;br&amp;gt;&lt;br /&gt;
- ETPub servers&amp;lt;br&amp;gt;&lt;br /&gt;
- General annoyance&amp;lt;br&amp;gt;&lt;br /&gt;
- Pub requests for a compition mod&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== My interpretation of ETTV setups ==&lt;br /&gt;
&lt;br /&gt;
Since I&#039;m quite fond of toying around with new developments, I&#039;m always one of the first to test new ETTV / ETPro releases and bug bani with questions about them. Having said that, here&#039;s my &#039;personal&#039; view on a good ETTV broadcast (this is not the Bible!):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
There are 5 different &amp;quot;participants&amp;quot; possibly involved in an ETTV broadcaster:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Master&#039;&#039;&#039; - the gameserver hosting the actual game&lt;br /&gt;
* &#039;&#039;&#039;Viewer&#039;&#039;&#039; - the viewer wanting to view a game (duh)&lt;br /&gt;
* &#039;&#039;&#039;Broadcaster&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows viewer to connect directly to itself&lt;br /&gt;
* &#039;&#039;&#039;Hub&#039;&#039;&#039; - a server that is directly connected to a gameserver and allows other ETTV &#039;slaves&#039; to connect to itself, but not viewers&lt;br /&gt;
* &#039;&#039;&#039;Slave&#039;&#039;&#039; - a server that connects to a hub or perhaps a broadcaster and and allows viewers to connect to itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep this terminology in mind when you stroll through my text ;-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Today&#039;s broadcasts ===&lt;br /&gt;
&lt;br /&gt;
Most ETTV games I see today use this set-up:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;Viewer -&amp;gt; Broadcaster -&amp;gt; Master&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you remember that an ETTV server connects at an &#039;&#039;unlimited rate&#039;&#039; to another server, you might see a problem arising when lots of people would like to see a &amp;quot;big match&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The trouble was / is that before ETTV b8 and &#039;autodelay&#039;, we had to do some fancy flying to get a delayed broadcast or delayed hub up. Usually you would start a &#039;recorder&#039; daemon that recorded demos and a &#039;playback&#039; daemon from that same directory, so that it started playing back the recorded demo after roughly 60 or 90 seconds. This does require fancy scripting and lots of manual work to sort out demos, connect slaves to hubs etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;ettv_autodelay&amp;lt;/code&amp;gt;, things have become a lot easier. Ideally the gameserver now only allows 2 or 4 ETTV hubs to connect to it, which delay and relay the signal. The responsibility for the admins of the hub is of course greater as they should not have any PK3s active on their hubs that are not on the pure list of the server. The less PK3s you need, the better!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Deej&#039;s proposition ===&lt;br /&gt;
&lt;br /&gt;
The best setup IMHO is to have the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Viewers -&amp;gt; Slave 1   |&lt;br /&gt;
Viewers -&amp;gt; Slave 2   |&lt;br /&gt;
Viewers -&amp;gt; Slave 3   |--&amp;gt; Hub 1 |&lt;br /&gt;
                     |--&amp;gt; Hub 2 | --&amp;gt; Master&lt;br /&gt;
Viewers -&amp;gt; Slave ... |--&amp;gt; Hub n |&lt;br /&gt;
                     |&lt;br /&gt;
Viewers -&amp;gt; Slave n   |&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This alleviates the load on the Master Game Server firmly as only 2 or 4 hubs are required where slaves can then connect to! Furthermore with autodelay all the &#039;slave&#039; administrators only need to connect their slave to a given hub. No more playing around with delays, demos, symbolic links, PIDs that get screwed up etc...&lt;br /&gt;
&lt;br /&gt;
== Some scripts I use ==&lt;br /&gt;
&lt;br /&gt;
=== Hub script ===&lt;br /&gt;
&lt;br /&gt;
This script launches a hub that delays its feed by x seconds, configurable inside the script. You can safely remove the stuff like PERONI_IP, FRAGLAND_IP etc... at the beginning since those only store the IPs of the root servers we manage (it&#039;s easier for me to keep track of them that way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How do you use this script?&#039;&#039;&#039; Copy / paste this script and save it as &amp;lt;code&amp;gt;hub.sh&amp;lt;/code&amp;gt; or any other name you prefer. Then use &amp;lt;code&amp;gt;./hub.sh start&amp;lt;/code&amp;gt; to start and &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; to stop your hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be aware that it&#039;s much better to actually do &amp;quot;quit&amp;quot; in the console of your hub instead of &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; as this cleanly disconnects the hub from a game server. With &amp;lt;code&amp;gt;./hub.sh stop&amp;lt;/code&amp;gt; the hub stays with ping 999 on the gameserver and needs to time out. Maybe we should ask Bani to improve POSIX signal interpretation of the ETTV binary :-).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#               reT!reD.ettv delayed hub script                 #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up a delayed ETTV stream    #&lt;br /&gt;
#  where ETTV slaves connect to the hub to relay the signal.    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The daemon serves as a hub for other ETTV slaves to connect  #&lt;br /&gt;
#  to and as such alleviate the load on the game server hosting #&lt;br /&gt;
#  the match.                                                   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script creates a subdirectory which represents the      #&lt;br /&gt;
#  date of the match and stores the demos in this subdir.       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  The script launches the daemon in a different screen         #&lt;br /&gt;
#  which you can reattach with &amp;quot;screen -r hub&amp;quot;.                 #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Parameters of the Game Server to Connect to&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the game server do &lt;br /&gt;
# &amp;quot;fdir *.pk3&amp;quot; in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
MATCH_DATE=`date +%Y%m%d`				# Do NOT modify&lt;br /&gt;
MATCH_HOST=&amp;quot;et.fragland.org:27965&amp;quot;			# Match server port &amp;amp; address&lt;br /&gt;
MATCH_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server ETTV password&lt;br /&gt;
MATCH_PASS=&amp;quot;[putpasshere]&amp;quot;				# Match server password&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# IPs &amp;amp; Ports For Your Host&lt;br /&gt;
#&lt;br /&gt;
THISHOST_IP=$PERONI_IP					# Replace with your IP&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;					# Port of the public hub for ETTV slaves&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Hostnames &amp;amp; ETTV Client name&lt;br /&gt;
#&lt;br /&gt;
# - hostname shows up in server browsers&lt;br /&gt;
# - ETTV client name shows up as the name&lt;br /&gt;
#   of your server in the game server.&lt;br /&gt;
#&lt;br /&gt;
HUB_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^7hub ^1#^71&amp;quot;&lt;br /&gt;
ETTV_CLIENT=$HUB_HOSTNAME&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Passwords&lt;br /&gt;
#&lt;br /&gt;
HUB_RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_hub&amp;quot;		# Path to ettv.x86. Use absolute paths!&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ETTV Net settings for ETTV b8 &amp;amp; up&lt;br /&gt;
#&lt;br /&gt;
ETTV_NETBLAST=&amp;quot;1&amp;quot;				# Sends all packets as one big one&lt;br /&gt;
ETTV_TV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_SV_IPTOS=&amp;quot;0&amp;quot;&lt;br /&gt;
ETTV_MTU=&amp;quot;1400&amp;quot;					# Only increase when ettv_netblast is 0&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Other relevant ETTV settings&lt;br /&gt;
#&lt;br /&gt;
SHOUTCAST_DELAY=&amp;quot;60&amp;quot;				# Delay between live match &amp;amp; broadcasting hub in seconds&lt;br /&gt;
HUB_SLAVES=&amp;quot;8&amp;quot;					# 1 ETTV slave connects at an UNLIMITED rate to the hub!&lt;br /&gt;
ALLOW_DL=&amp;quot;0&amp;quot;					# Allow downloading (only works for viewers on slaves)&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;0&amp;quot;				# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;		# Do not append a &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed can not log in. His homedir is equal to the path&lt;br /&gt;
# where all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH/$MATCH_DATE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HUB_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $THISHOST_IP \&lt;br /&gt;
+set net_port $HUB_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set g_password $HUB_PASS \&lt;br /&gt;
+set rconpassword $HUB_RCON_PASS \&lt;br /&gt;
+set sv_hostname $HUB_HOSTNAME \&lt;br /&gt;
+set sv_maxclients $((HUB_SLAVES+2)) \&lt;br /&gt;
+set sv_maxRate 25000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;hub.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+set b_ettv_flags 3 \&lt;br /&gt;
+set ettv_autorecord 1 \&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set ettv_sv_maxslaves $HUB_SLAVES \&lt;br /&gt;
+set ettv_password $HUB_ETTV_PASS \&lt;br /&gt;
+set ettv_netblast $ETTV_NETBLAST \&lt;br /&gt;
+set ettv_tv_iptos $ETTV_TV_IPTOS \&lt;br /&gt;
+set ettv_sv_iptos $ETTV_SV_IPTOS \&lt;br /&gt;
+set ettv_mtu $ETTV_MTU \&lt;br /&gt;
+set ettv_delay $SHOUTCAST_DELAY \&lt;br /&gt;
+tv connect $MATCH_HOST $MATCH_ETTV_PASS $MATCH_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
hub_start () {&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Match Date is &amp;quot;&lt;br /&gt;
	echo -n &amp;quot;$MATCH_DATE&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	echo -e &amp;quot;.\nDemos are stored in $HOMEPATH/etpro/demos/.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -n &amp;quot;Starting Hub: &amp;quot;&lt;br /&gt;
	screen -dmS hub su -m -c &amp;quot;$DAEMON $HUB_OPTIONS&amp;quot; - $USER&lt;br /&gt;
	sleep 1&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Hub has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$HUB_PID\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;ETTV slaves can now connect to your box by issuing:&amp;quot;&lt;br /&gt;
	echo -e &amp;quot;tv connect $THISHOST_IP:$HUB_PORT $HUB_ETTV_PASS $HUB_PASS\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hub_stop () {&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PIDs&lt;br /&gt;
	#&lt;br /&gt;
	get_pids&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Hub: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $HUB_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $HUB_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nHub wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	sleep 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
get_pids (){&lt;br /&gt;
	#&lt;br /&gt;
	# We used to launch the same binary twice so pidof didn&#039;t work.&lt;br /&gt;
	# As from beta 8 ettv delayed feeds were automatic so&lt;br /&gt;
	# no more fancy scripting tricks are required :-)&lt;br /&gt;
	#&lt;br /&gt;
	HUB_PID=`pidof $DAEMON`&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
clean_up (){&lt;br /&gt;
	#&lt;br /&gt;
	# Clean up prompt&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Clean up demos directory [y/n]? &amp;quot;&lt;br /&gt;
	read ANSWER&lt;br /&gt;
	case &amp;quot;$ANSWER&amp;quot; in&lt;br /&gt;
		y)&lt;br /&gt;
			rm -Rf $BASEPATH/$MATCH_DATE&lt;br /&gt;
			ls -l --color=always $BASEPATH&lt;br /&gt;
			;;&lt;br /&gt;
		*)&lt;br /&gt;
			echo &amp;quot;Following demos still exist:&amp;quot;&lt;br /&gt;
			ls -l --color=always $BASEPATH/$MATCH_DATE/etpro/demos/&lt;br /&gt;
			;;&lt;br /&gt;
	esac&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		hub_start&lt;br /&gt;
		;;&lt;br /&gt;
	    stop)&lt;br /&gt;
		hub_stop&lt;br /&gt;
		clean_up&lt;br /&gt;
		;;&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
		;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slave script ===&lt;br /&gt;
&lt;br /&gt;
This script connects an undelayed slave to a hub (that hopefully delays the signal ;-)). The usage of this script is very similar to the Hub script. Copy / paste it and save it as &amp;lt;code&amp;gt;slave.sh&amp;lt;/code&amp;gt; or any other name you prefer. THen issue &amp;lt;code&amp;gt;./slave.sh start&amp;lt;/code&amp;gt; to start your slave and &amp;lt;code&amp;gt;./slave.sh stop&amp;lt;/code&amp;gt; to stop it. Like above, it is actually better to do quit in the console instead of just killing the slave with this script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                  reT!reD.ettv slave script                    #&lt;br /&gt;
#                             -                                 #&lt;br /&gt;
#                        reT!reD.deej                           #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script can be used to start up an ETTV slave to connect #&lt;br /&gt;
#  to a HUB provided by another server.                         #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  This script launches the daemon in a different screen which  #&lt;br /&gt;
#  you can reattach with &amp;quot;screen -r slave&amp;quot;                      #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#  Credits:                                                     #&lt;br /&gt;
#  - Daita (pourix.net) for the original idea &amp;amp; script          #&lt;br /&gt;
#  - Tony J. White (et.tjw.org) for his ETDED on Linux guide    #&lt;br /&gt;
#  - aNgel (fragland.org) for debugging Beavis&#039; mistakes ;-)    #&lt;br /&gt;
#                                                               #&lt;br /&gt;
# Questions? Contact me on deej@fragland.org or go to #r0f.et   #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                   http://www.fragland.org                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
# Webperoni Game Server IP&lt;br /&gt;
# ettv.fragland.org&lt;br /&gt;
PERONI_IP=&amp;quot;83.133.81.192&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Deinprovider WebServer IP&lt;br /&gt;
# ettv2.fragland.org&lt;br /&gt;
FRAGLAND_IP=&amp;quot;217.20.115.116&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Ionmedia Game Server IP&lt;br /&gt;
# ettv3.fragland.org&lt;br /&gt;
IONMEDIA_IP=&amp;quot;62.216.174.68&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Hetzner Game Server IP&lt;br /&gt;
# WServer2.ath.cx IP&lt;br /&gt;
# ettv4.fragland.org&lt;br /&gt;
HETZNER_IP=&amp;quot;213.239.207.195&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Planet Hosting Game Server IP&lt;br /&gt;
# ettv5.fragland.org&lt;br /&gt;
PLANET_IP=&amp;quot;85.190.1.13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                 Start Modifying From Here                     #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Hub Info&lt;br /&gt;
#&lt;br /&gt;
# IMPORTANT: Let the admin of the hub do a&lt;br /&gt;
# fdir *.pk3 in his console and give you the output!&lt;br /&gt;
#&lt;br /&gt;
# PK3 mismatches between game server and ETTV hosts&lt;br /&gt;
# account for the majority of crashes of ETTV.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
HUB_IP=$PERONI_IP			# Hub runs on Webperoni&lt;br /&gt;
HUB_PORT=&amp;quot;50000&amp;quot;&lt;br /&gt;
HUB_ETTV_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_PASS=&amp;quot;[get_pass_from_hub_admin]&amp;quot;&lt;br /&gt;
HUB_HOST=&amp;quot;$HUB_IP:$HUB_PORT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Slave Info &lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
SLAVE_IP=$FRAGLAND_IP			# select from list above&lt;br /&gt;
SLAVE_PORT=&amp;quot;27960&amp;quot;			# port of the public broadcaster&lt;br /&gt;
SLAVE_HOSTNAME=&amp;quot;^7reT^1!^7reD^1.^7ettv ^1#^72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ETTV_CLIENT=$SLAVE_HOSTNAME		# Shows up on Hub&lt;br /&gt;
&lt;br /&gt;
SLAVE_SLOTS=&amp;quot;100&amp;quot;&lt;br /&gt;
SLAVE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_PRIVATE_SLOTS=&amp;quot;10&amp;quot;&lt;br /&gt;
SLAVE_PRIVATE_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_ETTV_SLAVES=&amp;quot;0&amp;quot;&lt;br /&gt;
SLAVE_ETTV_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RCON_PASS=&amp;quot;[putpasshere]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ALLOW_DL=&amp;quot;1&amp;quot;&lt;br /&gt;
ALLOW_WWW_DL=&amp;quot;1&amp;quot;			# Allow downloading over http?&lt;br /&gt;
WWW_DL_URL=&amp;quot;http://www.yoursite.com&amp;quot;	# No &amp;quot;/&amp;quot; at the end!&lt;br /&gt;
&lt;br /&gt;
RECORD_GAME=&amp;quot;0&amp;quot;				# 1 = record the game, 0 = don&#039;t&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Directories&lt;br /&gt;
#&lt;br /&gt;
BASEPATH=&amp;quot;/srv/et/ETTV/ettv_slave&amp;quot;	# Path to ettv.x86. Use absolute paths here!&lt;br /&gt;
&lt;br /&gt;
# &lt;br /&gt;
# User To Launch Daemon&lt;br /&gt;
#&lt;br /&gt;
# Good practice:&lt;br /&gt;
# What doesn&#039;t need root priviliges doesn&#039;t get them!&lt;br /&gt;
#&lt;br /&gt;
# User gamed mentioned here under is not a standard linux user,&lt;br /&gt;
# he was created on our systems by us.&lt;br /&gt;
#&lt;br /&gt;
# gamed cannot log in. His homedir is equal to the path where&lt;br /&gt;
# all our servers are installed.&lt;br /&gt;
#&lt;br /&gt;
USER=&amp;quot;gamed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#                                                               #&lt;br /&gt;
#                     STOP Modifying Here                       #&lt;br /&gt;
#                                                               #&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
# Assembling the Command Line&lt;br /&gt;
#&lt;br /&gt;
BINARY=&amp;quot;ettv.x86&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DAEMON=&amp;quot;$BASEPATH/$BINARY&amp;quot;&lt;br /&gt;
HOMEPATH=&amp;quot;$BASEPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLAVE_OPTIONS=&amp;quot;\&lt;br /&gt;
+set fs_game etpro \&lt;br /&gt;
+set dedicated 2 \&lt;br /&gt;
+set net_ip $SLAVE_IP \&lt;br /&gt;
+set net_port $SLAVE_PORT \&lt;br /&gt;
+set fs_basepath $BASEPATH \&lt;br /&gt;
+set fs_homepath $HOMEPATH \&lt;br /&gt;
+set com_hunkMegs 128 \&lt;br /&gt;
+set sv_maxclients $SLAVE_SLOTS \&lt;br /&gt;
+set sv_privateclients $SLAVE_PRIVATE_SLOTS \&lt;br /&gt;
+set sv_privatepassword $SLAVE_PRIVATE_PASS \&lt;br /&gt;
+set sv_hostname $SLAVE_HOSTNAME \&lt;br /&gt;
+set ettv_delay 0 \&lt;br /&gt;
+set ettv_autorecord $RECORD_GAME\&lt;br /&gt;
+set ettv_clientname $ETTV_CLIENT \&lt;br /&gt;
+set g_password $SLAVE_PASS \&lt;br /&gt;
+set rconpassword $RCON_PASS \&lt;br /&gt;
+set sv_maxRate 18000 \&lt;br /&gt;
+set sv_allowDownload $ALLOW_DL \&lt;br /&gt;
+set sv_wwwDownload $ALLOW_WWW_DL \&lt;br /&gt;
+set sv_wwwBaseURL &amp;quot;$WWW_DL_URL&amp;quot; \&lt;br /&gt;
+set sv_wwwDlDisconnected 0 \&lt;br /&gt;
+set g_log &amp;quot;slave.log&amp;quot; \&lt;br /&gt;
+set logfile 2 \&lt;br /&gt;
+tv connect $HUB_HOST $HUB_ETTV_PASS $HUB_PASS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Functions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
slave_start (){&lt;br /&gt;
	#&lt;br /&gt;
	# FYI&#039;ing the user&lt;br /&gt;
	#&lt;br /&gt;
	echo -n &amp;quot;Starting Slave: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	screen -dmS slave su -m -c &amp;quot;$DAEMON $SLAVE_OPTIONS&amp;quot; - $USER&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;done.\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;Getting PID...\n&amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Slave has PID &amp;quot;&lt;br /&gt;
	echo -e &amp;quot;$SLAVE_PID.\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
slave_stop (){&lt;br /&gt;
	#	&lt;br /&gt;
	# Refresh the PID&lt;br /&gt;
	#&lt;br /&gt;
	SLAVE_PID=`pidof $DAEMON`&lt;br /&gt;
	&lt;br /&gt;
	echo -n &amp;quot;Shutting Down Slave: &amp;quot;&lt;br /&gt;
	sleep 1&lt;br /&gt;
	if [ $SLAVE_PID ]&lt;br /&gt;
		then&lt;br /&gt;
			kill -3 $SLAVE_PID&lt;br /&gt;
			echo -e &amp;quot;done.&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			echo -e &amp;quot;failed.\nSlave wasn&#039;t active anymore.\n&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Performing The magic :-)&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
	start)&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;&lt;br /&gt;
	stop)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		;;&lt;br /&gt;
	restart)&lt;br /&gt;
		slave_stop&lt;br /&gt;
		sleep 1&lt;br /&gt;
		slave_start&lt;br /&gt;
		;;	&lt;br /&gt;
	*)&lt;br /&gt;
		SCRIPT_NAME=`basename $0`&lt;br /&gt;
		echo &amp;quot;Usage: $SCRIPT_NAME {start|stop|restart}&amp;quot;&lt;br /&gt;
		exit 1&lt;br /&gt;
	;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have fun broadcasting!&lt;br /&gt;
&lt;br /&gt;
[[User:Deej|deej]] 11:52, 5 November 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Deej</name></author>
	</entry>
</feed>