diff --git a/entrypoint.sh b/entrypoint.sh index 4a16d85..93ca9c7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,6 +6,8 @@ export max_listeners=${MAX_LISTENERS:=30} export admin_user=${ADMIN_USER:=admin} export admin_password=${ADMIN_PASSWORD:=admin} +m3u=${M3U:="http://${hostname}:${port}/radio-bullshit"} + pass_gen="python3 -c 'import secrets, string; print(\"\".join((secrets.choice(string.ascii_letters + string.digits) for i in range(20))))'" export source_username=$(eval $pass_gen) @@ -14,6 +16,8 @@ export source_password=$(eval $pass_gen) j2 ices.xml.jinja > ices.xml j2 icecast.xml.jinja > icecast.xml +echo ${m3u} > /usr/share/icecast2/web/radio-bullshit.m3u + runuser -l zambla -c 'icecast2 -c /config/icecast.xml &' /opt/ultrasync.sh & runuser -l zambla -c 'ices2 /config/ices.xml' diff --git a/icecast.xml.jinja b/icecast.xml.jinja index 70869f2..42d650c 100644 --- a/icecast.xml.jinja +++ b/icecast.xml.jinja @@ -1,6 +1,6 @@ Earth - icemaster@localhost + icemaster@{{ hostname }} 100 @@ -21,13 +21,14 @@ {{ hostname }} + +
+
+ + {{ port }} - -
- - /radio-bullshit @@ -36,18 +37,9 @@ {{ source_password }} {{ max_listeners }} - /tmp/dump-example1.ogg 65536 - /example2.ogg - 1 - 1 - /example_intro.ogg 1 1 - -
-
- 1 diff --git a/ices.xml.jinja b/ices.xml.jinja index f3d2afb..92332cd 100644 --- a/ices.xml.jinja +++ b/ices.xml.jinja @@ -15,6 +15,7 @@ {{ source_username }} {{ source_password }} /radio-bullshit + {{ port }} diff --git a/index.html b/index.html index d7d4c52..4723d54 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,22 @@ + + + Radio bullshit, la radio du paradis ! -