#!/bin/sh # audio-bridge entrypoint # Starts DBus, BlueZ, WirePlumber, then PipeWire. PA clients (librespot, mopidy) # connect via pipewire-pulse bridge on TCP localhost:4713. set -e mkdir -p /run/dbus /run/user/0 chmod 0755 /run/dbus chmod 0700 /run/user/0 # System DBus (needed by bluetoothd, wireplumber, pipewire) dbus-daemon --system --fork sleep 0.5 # BlueZ (Bluetooth stack). --compat = legacy mode for older audio devices. # Disabled if no /dev/bluetooth/rfkill — wireplumber will skip BT modules. if [ -d /sys/class/bluetooth ]; then bluetoothd --compat --nodetach & sleep 0.5 echo "[audio-bridge] bluetoothd started" else echo "[audio-bridge] no bluetooth hardware — skipping bluetoothd" fi # PipeWire runtime env export XDG_RUNTIME_DIR=/run/user/0 export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket # WirePlumber first (it manages PipeWire session/policy, loads BT modules) wireplumber & sleep 1 # PipeWire last. The pipewire-pulse package auto-loads the PA bridge module # so PA clients (librespot, mopidy) can connect via TCP localhost:4713. exec pipewire