Merge pull request #235 from vpeter4/dvb

hdhomerun/hdhomerun addon: remove unneeded files
This commit is contained in:
Stephan Raue 2012-02-26 11:07:17 -08:00
commit 2cd5356fad
4 changed files with 0 additions and 215 deletions

View File

@ -1,34 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# this script is executed when userhdhomerun program is started
while [ -z "$(pidof userhdhomerun)" ]; do
usleep 200000
done
usleep 500000
# restart the services
killall tvheadend
while [ -n "$(pidof tvheadend)" ]; do
usleep 200000
done
tvheadend.service

View File

@ -1,62 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
ADDON_NAME="driver.dvb.hdhomerun"
ADDON_DIR="$HOME/.xbmc/addons/$ADDON_NAME"
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/$ADDON_NAME"
mkdir -p $ADDON_HOME
if [ ! -f "$ADDON_HOME/dvbhdhomerun.sample" ]; then
cp $ADDON_DIR/config/* $ADDON_HOME/
fi
export LD_LIBRARY_PATH=$ADDON_DIR/lib:$LD_LIBRARY_PATH
if [ -z "$(pidof userhdhomerun)" ]; then
rm -f /tmp/dvbhdhomerun
[ -f $ADDON_HOME/dvbhdhomerun ] && ln -s $ADDON_HOME/dvbhdhomerun /tmp/dvbhdhomerun
modprobe dvb_hdhomerun
modprobe dvb_hdhomerun_fe
mkdir -p /var/log/
rm -f /var/log/dvbhdhomerun.log
cd $ADDON_DIR/bin
userhdhomerun -f
sh $ADDON_HOME/userhdhomerun-started.sh >/dev/null 2>&1 &
(
sleep 3
sn_old="dummy"
[ -f $ADDON_HOME/serial-number.txt ] && sn_old=$(cat $ADDON_HOME/serial-number.txt)
sn_new=$(grep "Name of device: " /var/log/dvbhdhomerun.log)
if [ "$sn_new" != "$sn_old" ]; then
grep "Name of device: " /var/log/dvbhdhomerun.log >$ADDON_HOME/serial-number.txt
fi
)&
fi

View File

@ -1,71 +0,0 @@
#!/bin/sh
#
# first argument: attach/detach
# second argument (DEVID - sequence number of device): 0/1/2/...
. /etc/profile
# which daemon to restart
TVHEADEND=1
MUMUDVB=0
ADDON_DIR="/storage/.xbmc/addons/driver.dvb.sundtek-mediatv"
ADDON_HOME="/storage/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv"
ATTACH_DETACH_LOG="$ADDON_HOME/attach_detach.log"
wait_process() {
while [ -n "$(pidof $1)" ]; do
usleep 200000
done
}
echo "============================================================================" >>$ATTACH_DETACH_LOG
echo "Date: `date`" >>$ATTACH_DETACH_LOG
echo "Params: action=$1 devid=$2" >>$ATTACH_DETACH_LOG
case "$1" in
attach)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ADDON_DIR/lib
export LD_PRELOAD=$LD_PRELOAD:$ADDON_DIR/lib/libmediaclient.so
(
# save adapter serial number (in background)
sleep 2
serial_number=`mediaclient -e | awk '/ID:/ {print $2}'`
if [ ! -f $ADDON_HOME/adapter_serial_number.txt ]; then
echo -n "$serial_number" >$ADDON_HOME/adapter_serial_number.txt
else
serial_number_read=`cat $ADDON_HOME/adapter_serial_number.txt`
if [ "$serial_number_read" != "$serial_number" ]; then
echo -n "$serial_number" >$ADDON_HOME/adapter_serial_number.txt
fi
fi
)&
;;
detach)
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH//:$ADDON_DIR\/lib/}
export LD_PRELOAD=${LD_PRELOAD//:$ADDON_DIR\/lib\/libmediaclient.so/}
;;
*)
exit $NA
;;
esac
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >>$ATTACH_DETACH_LOG
echo "LD_PRELOAD=$LD_PRELOAD" >>$ATTACH_DETACH_LOG
if [ "$TVHEADEND" = "1" -a -n "$(pidof tvheadend)" ]; then
echo "Restarting TVheadend..." >>$ATTACH_DETACH_LOG
sh /storage/.xbmc/addons/service.multimedia.hts-tvheadend/sleep.d/tvheadend.power suspend
wait_process tvheadend
sh /storage/.xbmc/addons/service.multimedia.hts-tvheadend/sleep.d/tvheadend.power resume
fi
if [ "$MUMUDVB" = "1" -a -n "$(pidof mumudvb)" ]; then
echo "Restarting MuMuDVB..." >>$ATTACH_DETACH_LOG
sh /storage/.xbmc/addons/service.multimedia.mumudvb/sleep.d/mumudvb.power suspend
wait_process mumudvb
sh /storage/.xbmc/addons/service.multimedia.mumudvb/sleep.d/mumudvb.power resume
fi

View File

@ -1,48 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv"
SUNDTEK_CONFIG_FILE="$ADDON_HOME/sundtek.conf"
mkdir -p $ADDON_HOME
if [ ! -f "$SUNDTEK_CONFIG_FILE" ]; then
cp $ADDON_DIR/config/* $ADDON_HOME/
fi
if [ ! -f "$ADDON_HOME/device_attach_detach.sh" ]; then
cp $ADDON_DIR/scripts/* $ADDON_HOME/
chmod +x $ADDON_HOME/*.sh
fi
if [ ! -x "$ADDON_HOME/device_attach_detach.sh" ]; then
chmod +x $ADDON_HOME/device_attach_detach.sh
fi
SUNDTEK_ARG="--pluginpath=$ADDON_DIR/bin --daemon"
if [ -z "$(pidof mediasrv)" ]; then
rm $ADDON_HOME/attach_detach.log
ln -sf $SUNDTEK_CONFIG_FILE /tmp/sundtek.conf
mediasrv $SUNDTEK_ARG
fi