summaryrefslogtreecommitdiffstats
path: root/roles/stream/templates/on-connect
blob: 0f613bf2ba50659e089498ae8c4b4f598c5f6a28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
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

start-stop-daemon --start --quiet --background \
                  --make-pidfile --pidfile $PIDFILE \
                  --oknodo \
                  --exec /usr/local/bin/{{ emacsconf_id }}-lowres-{{ item.id }}.sh > /dev/null