For a tool, which executes a configurable command when a bluetooth device connects, see repository https://github.com/joleuger/bluetooth-manager. It can be used to play an icecast stream.
> apt-get install libpam-systemd
> apt-get install pulseaudio gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-tools mpv
> apt-get install bluetooth bluez bluez-tools bluez-firmware pulseaudio-module-bluetooth
> adduser audioclient
> vim /etc/shadow (remove password)