summaryrefslogtreecommitdiffstats
path: root/roles/stream/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/stream/templates')
-rw-r--r--roles/stream/templates/emacsconf.nginx.conf19
-rw-r--r--roles/stream/templates/icecast.xml8
-rwxr-xr-xroles/stream/templates/on-connect1
-rwxr-xr-xroles/stream/templates/on-disconnect1
4 files changed, 21 insertions, 8 deletions
diff --git a/roles/stream/templates/emacsconf.nginx.conf b/roles/stream/templates/emacsconf.nginx.conf
index f814f31..277c833 100644
--- a/roles/stream/templates/emacsconf.nginx.conf
+++ b/roles/stream/templates/emacsconf.nginx.conf
@@ -1,5 +1,20 @@
-location /emacsconf/ {
- proxy_pass http://localhost:{{ icecast_port }};
+location ~ ^/((gen|dev)(-480p)?.webm)$ {
+ proxy_pass http://127.0.0.1:{{ icecast_port }}/$1;
+ proxy_http_version 1.1;
+ proxy_buffering off;
+ proxy_request_buffering off;
+ proxy_set_header Host $http_host;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_set_header X-Forwarded-Server $host;
+ proxy_set_header X-Real-IP $remote_addr;
+}
+
+location ~ ^/emacsconf/(.*)$ {
+ proxy_pass http://127.0.0.1:{{ icecast_port }}/$1;
proxy_http_version 1.1;
proxy_buffering off;
proxy_request_buffering off;
diff --git a/roles/stream/templates/icecast.xml b/roles/stream/templates/icecast.xml
index 37e1a0a..d97a515 100644
--- a/roles/stream/templates/icecast.xml
+++ b/roles/stream/templates/icecast.xml
@@ -189,10 +189,10 @@
-->
{% for track in emacsconf_tracks %}
<mount type="normal">
- <mount-name>/{{ emacsconf_id }}/{{ track.id }}.webm</mount-name>
+ <mount-name>/{{ track.id }}.webm</mount-name>
<username>{{ icecast_emacsconf_user }}</username>
<password>{{ icecast_emacsconf_password }}</password>
- {% if icecast_save_dump %}<dump-file>/data/{{ emacsconf_id }}-{{ emacsconf_year }}-{{ track.id }}_%Y-%m-%d_%H-%M-%S.webm</dump-file>{% endif %}
+ {% if not test_mode %}<dump-file>/data/{{ emacsconf_id }}-{{ emacsconf_year }}-{{ track.id }}_%Y-%m-%d_%H-%M-%S.webm</dump-file>{% endif %}
<stream-name>{{ emacsconf_name }} {{ emacsconf_year }} - {{ track.name }} track</stream-name>
<stream-description>The livestream for the {{ track.name }} track of {{ emacsconf_name }} {{ emacsconf_year }}</stream-description>
<stream-url>{{ track.watch }}</stream-url>
@@ -202,7 +202,7 @@
<on-disconnect>/usr/local/bin/{{ emacsconf_id }}-lowres-{{ track.id }}-on-disconnect</on-disconnect>
</mount>
<mount type="normal">
- <mount-name>/{{ emacsconf_id }}/{{ track.id }}-host.webm</mount-name>
+ <mount-name>/{{ track.id }}-host.webm</mount-name>
<username>{{ icecast_emacsconf_user }}</username>
<password>{{ icecast_emacsconf_password }}</password>
<stream-name>EmacsConf {{ emacsconf_year }} - {{ track.name }} track</stream-name>
@@ -213,7 +213,7 @@
<hidden>1</hidden>
</mount>
<mount type="normal">
- <mount-name>/{{ emacsconf_id }}/{{ track.id }}-480p.webm</mount-name>
+ <mount-name>/{{ track.id }}-480p.webm</mount-name>
<username>{{ icecast_emacsconf_user }}</username>
<password>{{ icecast_emacsconf_password }}</password>
<stream-name>{{ emacsconf_name }} {{ emacsconf_year }} - {{ track.name }} track (480p)</stream-name>
diff --git a/roles/stream/templates/on-connect b/roles/stream/templates/on-connect
index 0f613bf..cd9deb6 100755
--- a/roles/stream/templates/on-connect
+++ b/roles/stream/templates/on-connect
@@ -2,7 +2,6 @@
set -e
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
PIDFILE="{{ icecast_restream_dir }}/{{ emacsconf_id }}-lowres-{{ item.id }}.pid"
-echo $(date) " on connect {{ item.id }} $*" >> {{ icecast_restream_dir }}/restream.log
. /lib/lsb/init-functions
diff --git a/roles/stream/templates/on-disconnect b/roles/stream/templates/on-disconnect
index 5847356..15ae31b 100755
--- a/roles/stream/templates/on-disconnect
+++ b/roles/stream/templates/on-disconnect
@@ -2,7 +2,6 @@
set -e
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
PIDFILE="{{ icecast_restream_dir }}/{{ emacsconf_id }}-lowres-{{ item.id }}.pid"
-echo $(date) " on disconnect {{ item.id }} $*" >> {{ icecast_restream_dir }}/restream.log
. /lib/lsb/init-functions