#!/bin/sh # # start and restart vdr case "$1" in start | resume) . /etc/init.d/rc.functions echo "Starting VDR" if [ -e /var/run/runvdr.pid ]; then runvdr -k fi if ls /etc/vdr/remote.conf.* >/dev/null 2>&1; then cat /etc/vdr/remote.conf.* >> /etc/vdr/remote.conf rm -f /etc/vdr/remote.conf.* fi if [ -n "$VDR_CONSOLE" ]; then if [ "$VDR_CONSOLE" != "1" -o "$SHOW_PROMPT" != "1" ]; then console=tty$VDR_CONSOLE # Disable Prompt on VDR Console sed "s/^\(tty$VDR_CONSOLE::\)/#\1/" -i /etc/inittab init -q # Disable Powersave setterm -cursor off -blank 0 -powerdown 0 > /dev/tty$VDR_CONSOLE fi # Wechsel Console chvt $VDR_CONSOLE fi runvdr >>/var/log/sysinit 2>&1 /dev/null; do i=$(($i+1)) sleep 1 "#waiting for vdr startup"; done # show startup info on OSD infofile="/tmp/vdr.info" if [ -e /var/spool/apm.depend ]; then echo -e "Addon dependencies are not fulfilled. \nPlease install the following Addons:" >>$infofile while read addon; do echo " - $addon" >>$infofile done < /var/spool/apm.depend rm /var/spool/apm.depend echo -e "\n" >>$infofile fi if [ -e /etc/vdr/remote.txt ]; then if [ -n "`apm l | grep skincurses`" ]; then cat /etc/vdr/remote.txt >>$infofile else cat /etc/vdr/remote.txt | sed "s/ / /g" >>$infofile fi rm /etc/vdr/remote.txt echo -e "\n" >>$infofile fi if [ "$VDR_CHANNELLIST" = "DVB-ALL" ]; then echo "Die aktuelle Kanalliste ist ein Mix aus allen uns bekannten Anbietern." >>$infofile echo "Bitte zappen Sie so lange mit der /\-Taste bis Sie ein Bild sehen." >>$infofile echo "Eine passende Kanalliste laesst sich im OSD unter System/SystemSetup/TV/VDR/Kanalliste auswaehlen." >>$infofile echo -e "\n" >>$infofile fi if [ -s $infofile ]; then { #sleep 10 svdrpsend.sh "PLUG addons SHOW $infofile" >/dev/null rm $infofile } & fi check_status ;; teststop) ;; stop | halt) . /etc/init.d/rc.functions rm -f /var/run/runvdr.pid echo "Stopping VDR" runvdr -k check_status ;; restart) . /etc/init.d/rc.functions echo "Restarting VDR" runvdr -r check_status ;; quickrestart | qr) . /etc/init.d/rc.functions echo "Quick restarting VDR" runvdr -q check_status ;; init) start=1 halt=1 resume=1 stop=1 priority=5 ;; *) echo "Usage $0 { start | stop | restart | quickrestart}" >&2 exit 1 esac