#!/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" cat "$DOCKER_DIR/lsyncd.conf" | template.sh "$DOCKER_DIR/.env" > "$TMP_DIR/lsyncd.conf" pid_file="$TMP_DIR/lsyncd.pid" [ -f "$pid_file" ] && kill "$(cat "$pid_file")" || true lsyncd "$TMP_DIR/lsyncd.conf" -pidfile "$pid_file" 2>&1 >> "$TMP_DIR/lsyncd.log" &