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-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
|
|
|
|
initctl stop hyperion
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-10-16 17:56:27 +02:00
|
|
|
wget -N github.com/tvdzwan/hyperion/raw/master/deploy/hyperiond -P /usr/bin/
|
|
|
|
wget -N github.com/tvdzwan/hyperion/raw/master/deploy/hyperion-remote -P /usr/bin/
|
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-10-16 17:56:27 +02:00
|
|
|
wget -N github.com/tvdzwan/hyperion/raw/master/deploy/gpio2spi -P /usr/bin/
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-10-02 09:44:08 +02:00
|
|
|
# Copy the hyperion configuration file to /etc
|
2013-10-16 17:56:27 +02:00
|
|
|
wget -N github.com/tvdzwan/hyperion/raw/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-10-16 17:56:27 +02:00
|
|
|
wget -N github.com/tvdzwan/hyperion/raw/master/deploy/hyperion.conf -P /etc/init/
|
2013-10-02 09:44:08 +02:00
|
|
|
|
2013-10-16 17:46:20 +02:00
|
|
|
# Set permissions
|
|
|
|
chmod +x /usr/bin/hyperiond
|
|
|
|
chmod +x /usr/bin/hyperion-remote
|
|
|
|
chmod +x /usr/bin/gpio2spi
|
2013-10-02 09:44:08 +02:00
|
|
|
|
|
|
|
# Start the hyperion daemon
|
|
|
|
initctl start hyperion
|