#!/bin/sh

export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"

HOME=/root PULSE_STATE_PATH=/mnt/Userfs/pulse PULSE_RUNTIME_PATH=/var/run/pulse LD_LIBRARY_PATH=/lib/pulseaudio/:/lib/pulse-8.0/modules/ pulseaudio -p /lib/pulse-8.0/modules/ -vvvvv --log-meta --disallow-exit &

until /libexec/bluetooth/bluetoothd; do #will wait for end of process
    echo "bluetoothd crashed with exit code $?.  Respawning.." >&2
    sleep 1
done 
