#!/bin/bash
# www.francescomoretta.com/foto/varie/tidal/BubbleUPnPServer_install_Raspbian.bash

#Install Java runtime
sudo apt-get update
sudo apt-get install openjdk-11-jdk

#Install BubbleUPnPServer in /usr/local/bin 
sudo mkdir /usr/local/bin/BubbleUPnPServer
cd /usr/local/bin/BubbleUPnPServer
sudo wget http://www.bubblesoftapps.com/bubbleupnpserver/BubbleUPnPServer-distrib.zip
sudo unzip BubbleUPnPServer-distrib.zip

#Configure automatic start at boot and stop at shutdown 
cd /etc/init.d
sudo wget http://www.francescomoretta.com/foto/varie/tidal/BubbleUPnPServer
sudo chmod +x /etc/init.d/BubbleUPnPServer
sudo update-rc.d BubbleUPnPServer defaults