mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Update install/update script
Added build scripts for building different releases (in cross-compile) Added new releases for rpi/imx6/wetek/x32/x64 Former-commit-id: 2025f1e3e8663d733b60a18944c6097da4ee371b
This commit is contained in:
2
deploy/hyperion-remote.sh
Normal file
2
deploy/hyperion-remote.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperion-remote "$@"
|
1
deploy/hyperion.deps.openelec-imx6.tar.gz.REMOVED.git-id
Normal file
1
deploy/hyperion.deps.openelec-imx6.tar.gz.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
198ac3d44bac13ba993069454397ad8c201d37b9
|
@@ -1 +1 @@
|
||||
8708dec3801868f8710e06bd9186fc520f7e639f
|
||||
9a4c5499f7191aad3e23e0e3be806861a3ec1c02
|
1
deploy/hyperion_rpi.tar.gz.REMOVED.git-id
Normal file
1
deploy/hyperion_rpi.tar.gz.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
3a346e54f8958f87ae7f4e8804f6afdec33aa9fc
|
1
deploy/hyperion_wetek.tar.gz.REMOVED.git-id
Normal file
1
deploy/hyperion_wetek.tar.gz.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
05227980ea998eeeecda03cefe090b5f55ff8ee0
|
1
deploy/hyperion_x32.tar.gz.REMOVED.git-id
Normal file
1
deploy/hyperion_x32.tar.gz.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
f3e3f4a3a8e52e4bfaf9a0337cb364da841e150b
|
1
deploy/hyperion_x64.tar.gz.REMOVED.git-id
Normal file
1
deploy/hyperion_x64.tar.gz.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
9342bb64479ea4d5554f301b905a0a830e330635
|
2
deploy/hyperiond.sh
Normal file
2
deploy/hyperiond.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperiond "$@"
|
114
deploy/update_hyperion.sh
Normal file
114
deploy/update_hyperion.sh
Normal file
@@ -0,0 +1,114 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script for downloading and installing the latest Hyperion release
|
||||
|
||||
# Make sure /sbin is on the path (for service to find sub scripts)
|
||||
PATH="/sbin:$PATH"
|
||||
|
||||
# Find out if we are on OpenElec
|
||||
OS_OPENELEC=`cat /etc/issue | grep -m 1 OpenELEC | wc -l`
|
||||
|
||||
# Find out if its an imx6 device
|
||||
CPU_RPI=`cat /proc/cpuinfo | grep RPI | wc -l`
|
||||
CPU_IMX6=`cat /proc/cpuinfo | grep i.MX6 | wc -l`
|
||||
CPU_WETEK=`cat /proc/cpyinfo | grep wetek | wc -l`
|
||||
CPU_X64=`uname -m | grep x86_64 | wc -l`
|
||||
CPU_X32=`uname -m | grep x86_32 | wc -l`
|
||||
# Check that we have a known configuration
|
||||
if [ $CPU_RPI -ne 1 ] & [ $CPU_IMX6 -ne 1 ] & [ $CPU_WETEK -ne 1 ] & [ $CPU_X64 -ne 1 ] & [ $CPU_X32 -ne 1 ]; then
|
||||
echo 'CPU information does not match any known releases'
|
||||
exit
|
||||
fi
|
||||
|
||||
# check which init script we should use
|
||||
USE_INITCTL=`which /sbin/initctl | wc -l`
|
||||
USE_SERVICE=`which /usr/sbin/service | wc -l`
|
||||
|
||||
# Make sure that the boblight daemon is no longer running
|
||||
BOBLIGHT_PROCNR=$(pidof boblightd | 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
|
||||
# Start the hyperion daemon
|
||||
if [ $USE_INITCTL -eq 1 ]; then
|
||||
/sbin/initctl stop hyperion
|
||||
elif [ $USE_SERVICE -eq 1 ]; then
|
||||
/usr/sbin/service hyperion stop
|
||||
fi
|
||||
|
||||
# Select the appropriate release
|
||||
HYPERION_ADDRESS=https://raw.githubusercontent.com/tvdzwan/hyperion/master/deploy
|
||||
if [ $CPU_RPI -eq 1 ]; then
|
||||
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi.tar.gz
|
||||
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
||||
elif [ $CPU_IMX6 -eq 1 ]; then
|
||||
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_imx6.tar.gz
|
||||
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-imx6.tar.gz
|
||||
elif [ $CPU_WETEK -eq 1 ]; then
|
||||
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_wetek.tar.gz
|
||||
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz
|
||||
elif [ $CPU_X64 -eq 1 ]; then
|
||||
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_x64.tar.gz
|
||||
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-x64.tar.gz
|
||||
elif [ $CPU_X32 -eq 1 ]; then
|
||||
HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_x32.tar.gz
|
||||
OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-x32.tar.gz
|
||||
else
|
||||
echo "Target platform unknown"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Get and extract the Hyperion binaries and effects
|
||||
echo 'Downloading hyperion'
|
||||
if [ $OS_OPENELEC -eq 1 ]; then
|
||||
# OpenELEC has a readonly file system. Use alternative location
|
||||
curl -L --get $HYPERION_RELEASE | tar -C /storage -xz
|
||||
curl -L --get $OE_DEPENDECIES | tar -C /storage/hyperion/bin -xz
|
||||
|
||||
# modify the default config to have a correct effect path
|
||||
sed -i 's:/opt:/storage:g' /storage/hyperion/config/hyperion.config.json
|
||||
|
||||
# /storage/.config is available as samba share. A symbolic link would not be working
|
||||
false | cp -i /storage/hyperion/config/hyperion.config.json /storage/.config/hyperion.config.json 2>/dev/null
|
||||
else
|
||||
wget $HYPERION_RELEASE -O - | tar -C /opt -xz
|
||||
|
||||
# create links to the binaries
|
||||
ln -fs /opt/hyperion/bin/hyperiond /usr/bin/hyperiond
|
||||
ln -fs /opt/hyperion/bin/hyperion-remote /usr/bin/hyperion-remote
|
||||
ln -fs /opt/hyperion/bin/hyperion-v4l2 /usr/bin/hyperion-v4l2
|
||||
|
||||
# Copy a link to the hyperion configuration file to /etc
|
||||
ln -s /opt/hyperion/config/hyperion.config.json /etc/hyperion.config.json
|
||||
fi
|
||||
|
||||
# Copy the service control configuration to /etc/int
|
||||
if [ $USE_INITCTL -eq 1 ]; then
|
||||
echo 'Installing initctl script'
|
||||
wget -N https://raw.githubusercontent.com/tvdzwan/hyperion/master/deploy/hyperion.conf -P /etc/init/
|
||||
initctl reload-configuration
|
||||
elif [ $USE_SERVICE -eq 1 ]; then
|
||||
echo 'Installing startup script in init.d'
|
||||
# place startup script in init.d and add it to upstart
|
||||
ln -fs /opt/hyperion/init.d/hyperion.init.sh /etc/init.d/hyperion
|
||||
chmod +x /etc/init.d/hyperion
|
||||
update-rc.d hyperion defaults 98 02
|
||||
elif [ $IS_OPENELEC -eq 1 ]; then
|
||||
# only add to start script if hyperion is not present yet
|
||||
if [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperiond | wc -l` -eq 0 ]; then
|
||||
echo 'Adding Hyperion to autostart script'
|
||||
echo "/storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json > /dev/null 2>&1 &" >> /storage/.config/autostart.sh
|
||||
chmod +x /storage/.config/autostart.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
# Start the hyperion daemon
|
||||
if [ $USE_INITCTL -eq 1 ]; then
|
||||
/sbin/initctl start hyperion
|
||||
elif [ $USE_SERVICE -eq 1 ]; then
|
||||
/usr/sbin/service hyperion start
|
||||
fi
|
||||
|
Reference in New Issue
Block a user