#!/bin/sh

# Script for removing the existing boblight library and replacing it with Hyperion

# First stop the current BobLight demon and XBMC
initctl stop xbmc
initctl stop boblight

# Install the RapsiLight library
cp libbob2hyperion.so /usr/lib/libbob2hyperion.so
chmod 755 /usr/lib/libbob2hyperion.so
cp hyperion.config.json /etc/
cp hyperion.schema.json /etc/

# Remove the existing boblight client library (make backup)
cp /usr/lib/libboblight.so.0.0.0 /usr/lib/libboblight.old
# Rename the settings file to ensure that the boblight-deamon does not start
mv /etc/bobconfig.txt /etc/bobconfig.txt.old

# Link libboblight to the new installed library
ln -s /usr/lib/libbob2hyperion.so /usr/lib/libboblight.so.0.0.0

# Restart only XBMC
initctl start xbmc

#!/bin/sh

# Script for downloading and installing the latest Hyperion release

# Make sure that the boblight daemon is no longer running
BOBLIGHT_PROCNR=$(ps -e | grep "boblight" | wc -l)
if [ $BOBLIGHT_PROCNR -eq 1 ];
then
	echo 'Found running instance of boblight. Please stop boblight via XBMC menu before installing hyperion'
	exit
fi

# Stop hyperion daemon if it is running
initctl stop hyperion

# Copy the hyperion-binaries to the /usr/bin
wget github.com/tvdzwan/hyperion/tree/master/deploy/hyperiond -P /usr/bin/
wget github.com/tvdzwan/hyperion/tree/master/deploy/hyperion-remote -P /usr/bin/

# Copy the hyperion configuration file to /etc
wget github.com/tvdzwan/hyperion/tree/master/config/hyperion.config.json -P /etc/

# Copy the service control configuration to /etc/int
wget github.com/tvdzwan/hyperion/tree/master/bin/hyperion.conf -P /etc/init/

# Start the hyperion daemon
initctl start hyperion

Update of the installation script to use wget to obtain the latest release in deploy
Update of the installation script to use wget to obtain the latest release in deploy


Former-commit-id: f9b1be2af9c9f2bcfc79fa6851a4dec4d2e494ce