mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
LibreELEC support added
Former-commit-id: 8448696709ac57bb29f9e31d17125776e50ad2bb
This commit is contained in:
parent
d5e6a4cdaa
commit
f1c510bc81
@ -23,7 +23,7 @@ fi
|
|||||||
#Set welcome message
|
#Set welcome message
|
||||||
if [ $BETA -eq 1 ]; then
|
if [ $BETA -eq 1 ]; then
|
||||||
WMESSAGE="echo This script will update Hyperion to the latest BETA"
|
WMESSAGE="echo This script will update Hyperion to the latest BETA"
|
||||||
else WMESSAGE="echo This script will install/update Hyperion ambilight"
|
else WMESSAGE="echo This script will install/update Hyperion Ambilight"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Welcome message
|
#Welcome message
|
||||||
@ -33,7 +33,8 @@ echo 'Created by brindosch - hyperion-project.org - the official Hyperion source
|
|||||||
echo '*******************************************************************************'
|
echo '*******************************************************************************'
|
||||||
|
|
||||||
# Find out if we are on OpenElec (Rasplex) / OSMC / Raspbian
|
# Find out if we are on OpenElec (Rasplex) / OSMC / Raspbian
|
||||||
OS_OPENELEC=`grep -m1 -c 'OpenELEC\|RasPlex' /etc/issue`
|
OS_OPENELEC=`grep -m1 -c 'OpenELEC\|RasPlex\|LibreELEC' /etc/issue`
|
||||||
|
OS_LIBREELEC=`grep -m1 -c LibreELEC /etc/issue`
|
||||||
OS_RASPLEX=`grep -m1 -c RasPlex /etc/issue`
|
OS_RASPLEX=`grep -m1 -c RasPlex /etc/issue`
|
||||||
OS_OSMC=`grep -m1 -c OSMC /etc/issue`
|
OS_OSMC=`grep -m1 -c OSMC /etc/issue`
|
||||||
OS_RASPBIAN=`grep -m1 -c 'Raspbian\|RetroPie' /etc/issue`
|
OS_RASPBIAN=`grep -m1 -c 'Raspbian\|RetroPie' /etc/issue`
|
||||||
@ -99,20 +100,25 @@ if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -ne 1 ]; then
|
|||||||
if [ $SPIOK -ne 1 ]; then
|
if [ $SPIOK -ne 1 ]; then
|
||||||
echo '---> Raspberry Pi found, but SPI is not ready, we write "dtparam=spi=on" to /boot/config.txt'
|
echo '---> Raspberry Pi found, but SPI is not ready, we write "dtparam=spi=on" to /boot/config.txt'
|
||||||
sed -i '$a dtparam=spi=on' /boot/config.txt
|
sed -i '$a dtparam=spi=on' /boot/config.txt
|
||||||
REBOOTMESSAGE="echo Please reboot your Raspberry Pi, we inserted dtparam=spi=on to /boot/config.txt"
|
if [ $HCInstall -ne 1 ]; then
|
||||||
|
REBOOTMESSAGE="echo Please reboot your Raspberry Pi, we inserted dtparam=spi=on to /boot/config.txt"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Check, if dtparam=spi=on is in place (just for OPENELEC)
|
#Check, if dtparam=spi=on is in place (just for OPENELEC/LibreELEC
|
||||||
|
)
|
||||||
if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ]; then
|
if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ]; then
|
||||||
SPIOK=`grep '^\dtparam=spi=on' /flash/config.txt | wc -l`
|
SPIOK=`grep '^\dtparam=spi=on' /flash/config.txt | wc -l`
|
||||||
if [ $SPIOK -ne 1 ]; then
|
if [ $SPIOK -ne 1 ]; then
|
||||||
mount -o remount,rw /flash
|
mount -o remount,rw /flash
|
||||||
echo '---> Raspberry Pi with OpenELEC found, but SPI is not ready, we write "dtparam=spi=on" to /flash/config.txt'
|
echo '---> Raspberry Pi with OpenELEC/LibreELEC found, but SPI is not set, we write "dtparam=spi=on" to /flash/config.txt'
|
||||||
sed -i '$a dtparam=spi=on' /flash/config.txt
|
sed -i '$a dtparam=spi=on' /flash/config.txt
|
||||||
mount -o remount,ro /flash
|
mount -o remount,ro /flash
|
||||||
REBOOTMESSAGE="echo Please reboot your OpenELEC, we inserted dtparam=spi=on to /flash/config.txt"
|
if [ $HCInstall -ne 1 ]; then
|
||||||
fi
|
REBOOTMESSAGE="echo Please reboot your OpenELEC/LibreELEC, we inserted dtparam=spi=on to /flash/config.txt"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Backup the .conf files, if present
|
#Backup the .conf files, if present
|
||||||
@ -132,6 +138,15 @@ fi
|
|||||||
if [ $CPU_RPI -eq 1 ] && [ $OS_RASPLEX -eq 1 ]; then
|
if [ $CPU_RPI -eq 1 ] && [ $OS_RASPLEX -eq 1 ]; then
|
||||||
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi_rasplex.tar.gz
|
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi_rasplex.tar.gz
|
||||||
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
||||||
|
elif [ $CPU_RPI -eq 1 ] && [ $OS_LIBREELEC -eq 1 ] && [ $RPI_1 -eq 1 ]; then
|
||||||
|
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi_le.tar.gz
|
||||||
|
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
||||||
|
elif [ $CPU_RPI -eq 1 ] && [ $OS_LIBREELEC -eq 1 ] && [ $RPI_2 -eq 1 ]; then
|
||||||
|
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi2_le.tar.gz
|
||||||
|
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
||||||
|
elif [ $CPU_RPI -eq 1 ] && [ $OS_LIBREELEC -eq 1 ] && [ $RPI_3 -eq 1 ]; then
|
||||||
|
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi3_le.tar.gz
|
||||||
|
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
||||||
elif [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ] && [ $RPI_1 -eq 1 ]; then
|
elif [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ] && [ $RPI_1 -eq 1 ]; then
|
||||||
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi_oe.tar.gz
|
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi_oe.tar.gz
|
||||||
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
||||||
@ -171,9 +186,9 @@ fi
|
|||||||
echo '---> Downloading the appropriate Hyperion release'
|
echo '---> Downloading the appropriate Hyperion release'
|
||||||
if [ $OS_OPENELEC -eq 1 ]; then
|
if [ $OS_OPENELEC -eq 1 ]; then
|
||||||
# OpenELEC has a readonly file system. Use alternative location
|
# OpenELEC has a readonly file system. Use alternative location
|
||||||
echo '---> Downloading Hyperion OpenELEC release'
|
echo '---> Downloading Hyperion OpenELEC/LibreELEC release'
|
||||||
curl -# -L --get $HYPERION_RELEASE | tar -C /storage -xz
|
curl -# -L --get $HYPERION_RELEASE | tar -C /storage -xz
|
||||||
echo '---> Downloading Hyperion OpenELEC dependencies'
|
echo '---> Downloading Hyperion OpenELEC/LibreELEC dependencies'
|
||||||
curl -# -L --get $OE_DEPENDECIES | tar -C /storage/hyperion/bin -xz
|
curl -# -L --get $OE_DEPENDECIES | tar -C /storage/hyperion/bin -xz
|
||||||
#set the executen bit (failsave)
|
#set the executen bit (failsave)
|
||||||
chmod +x -R /storage/hyperion/bin
|
chmod +x -R /storage/hyperion/bin
|
||||||
@ -213,13 +228,13 @@ elif [ $OS_OPENELEC -eq 1 ]; then
|
|||||||
mkdir /storage/logfiles 2>/dev/null
|
mkdir /storage/logfiles 2>/dev/null
|
||||||
touch /storage/.config/autostart.sh 2>/dev/null
|
touch /storage/.config/autostart.sh 2>/dev/null
|
||||||
if [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperiond | wc -l` -eq 0 ]; then
|
if [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperiond | wc -l` -eq 0 ]; then
|
||||||
echo '---> Adding Hyperion to OpenELEC autostart.sh'
|
echo '---> Adding Hyperion to OpenELEC/LibreELEC autostart.sh'
|
||||||
echo "/storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json > /storage/logfiles/hyperion.log 2>&1 &" >> /storage/.config/autostart.sh
|
echo "/storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json > /storage/logfiles/hyperion.log 2>&1 &" >> /storage/.config/autostart.sh
|
||||||
chmod +x /storage/.config/autostart.sh
|
chmod +x /storage/.config/autostart.sh
|
||||||
fi
|
fi
|
||||||
# only add hyperion-x11 to startup, if not found and x32x64 detected
|
# only add hyperion-x11 to startup, if not found and x32x64 detected
|
||||||
if [ $CPU_X32X64 -eq 1 ] && [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperion-x11 | wc -l` -eq 0 ]; then
|
if [ $CPU_X32X64 -eq 1 ] && [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperion-x11 | wc -l` -eq 0 ]; then
|
||||||
echo '---> Adding Hyperion-x11 to OpenELEC autostart.sh'
|
echo '---> Adding Hyperion-x11 to OpenELEC/LibreELEC autostart.sh'
|
||||||
echo "DISPLAY=:0.0 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperion-x11 </dev/null >/storage/logfiles/hyperion.log 2>&1 &" >> /storage/.config/autostart.sh
|
echo "DISPLAY=:0.0 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperion-x11 </dev/null >/storage/logfiles/hyperion.log 2>&1 &" >> /storage/.config/autostart.sh
|
||||||
fi
|
fi
|
||||||
elif [ $USE_SYSTEMD -eq 1 ]; then
|
elif [ $USE_SYSTEMD -eq 1 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user