jean-cloud-services/services/soundbase.radiokipik.org/regen_website.sh
2025-10-31 18:49:12 +01:00

16 lines
657 B
Bash
Executable File

#!/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" &