#!/bin/bash -e export hostname=${HOSTNAME:=localhost} export port=${PORT:=8000} export max_listeners=${MAX_LISTENERS:=30} export admin_user=${ADMIN_USER:=admin} export admin_password=${ADMIN_PASSWORD:=admin} 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) export source_password=$(eval $pass_gen) j2 ices.xml.jinja > ices.xml j2 icecast.xml.jinja > icecast.xml runuser -l zambla -c 'icecast2 -c /config/icecast.xml &' runuser -l zambla -c '/opt/ultrasync.sh &' runuser -l zambla -c 'ices2 /config/ices.xml'