#!/bin/bash set -euo pipefail echo "Generate website" if [ -e "$DATA_DIR/soundbase/fic/_website-_config.fic" ] ; then "omarustwebsite-$OMA_DOCKER_VERSION" --soundbase-path $DATA_DIR/soundbase --output $DATA_DIR/soundbase/website/ --soundbase-prefix '/soundbase' --website-prefix '' --manager-url "https://$JC_SERVICE/manager" --player-url '/soundbase/player' --websocket-port "$WEBSOCKET_PORT" --radio-host "$RADIO_HOST" fi echo "(kill and) start lsyncd with head" killall lsyncd 2>/dev/null || true cat "$DOCKER_DIR/lsyncd.conf" | template.sh "$DOCKER_DIR/.env" > "$TMP_DIR/lsyncd.conf" lsyncd "$TMP_DIR/lsyncd.conf" 2>&1 >> "$TMP_DIR/lsyncd.log" &