2013-07-26 22:38:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-10-02 09:44:08 +02:00
|
|
|
# Script for downloading and installing the latest Hyperion release
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-11-24 13:37:30 +01:00
|
|
|
# Find out if we are on XBian
|
|
|
|
IS_XBIAN=`cat /etc/issue | grep XBian | wc -l`
|
|
|
|
|
2013-10-02 09:44:08 +02:00
|
|
|
# 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
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-10-02 09:44:08 +02:00
|
|
|
# Stop hyperion daemon if it is running
|
2013-11-24 13:37:30 +01:00
|
|
|
/sbin/initctl stop hyperion
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-11-24 13:37:30 +01:00
|
|
|
# Get the Hyperion executable
|
2013-12-05 07:18:26 +01:00
|
|
|
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperiond -P /usr/bin/
|
2013-11-24 13:37:30 +01:00
|
|
|
chmod +x /usr/bin/hyperiond
|
|
|
|
|
|
|
|
# Get the Hyperion command line utility
|
2013-12-05 07:18:26 +01:00
|
|
|
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion-remote -P /usr/bin/
|
2013-11-24 13:37:30 +01:00
|
|
|
chmod +x /usr/bin/hyperion-remote
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-10-14 21:03:58 +02:00
|
|
|
# Copy the gpio changer (gpio->spi) to the /usr/bin
|
2013-11-24 13:37:30 +01:00
|
|
|
if [ $IS_XBIAN -eq 0 ]; then
|
2013-12-05 07:18:26 +01:00
|
|
|
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/gpio2spi -P /usr/bin/
|
2013-11-24 13:37:30 +01:00
|
|
|
chmod +x /usr/bin/gpio2spi
|
|
|
|
fi
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-10-02 09:44:08 +02:00
|
|
|
# Copy the hyperion configuration file to /etc
|
2013-12-05 07:18:26 +01:00
|
|
|
wget -N https://raw.github.com/tvdzwan/hyperion/master/config/hyperion.config.json -P /etc/
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-10-02 09:44:08 +02:00
|
|
|
# Copy the service control configuration to /etc/int
|
2013-11-24 13:37:30 +01:00
|
|
|
if [ $IS_XBIAN -eq 0 ]; then
|
2013-12-05 07:18:26 +01:00
|
|
|
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion.conf -P /etc/init/
|
2013-11-24 13:37:30 +01:00
|
|
|
else
|
2013-12-05 07:18:26 +01:00
|
|
|
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion.xbian.conf -O /etc/init/hyperion.conf
|
2013-11-24 13:37:30 +01:00
|
|
|
fi
|
2013-10-02 09:44:08 +02:00
|
|
|
|
|
|
|
# Start the hyperion daemon
|
2013-11-24 13:37:30 +01:00
|
|
|
/sbin/initctl start hyperion
|