#!/bin/sh case "$1" in install) . /etc/init.d/rc.functions # EPGD ChannelMap auswählen if [ ! -e /etc/epgd/channelmap.conf ]; then test -n "$QUIET" || hide_splash for list in $(ls /etc/epgd/channelmaps/ | sort); do optionen="$optionen '${list%.*}' ''" done test -z "$QUIET" && eval dialog --clear --backtitle \"$SYSTEM_NAME\" --title \"$(tr 'EPGD ChannelMap list')\" --menu \"$(tr 'Please select your ChannelMap')\" 20 50 13 $optionen 2>map.tmp >${DIALOG_OUT-/dev/stdout} if [ $? = 0 ]; then map="$(cat map.tmp)" epgdata="$(echo -e "$map" | grep "epgData" | wc -l)" if [ "$epgdata" -gt 0 ]; then test -z "$QUIET" && eval dialog --clear --backtitle \"$SYSTEM_NAME\" --title \"$(tr 'epgData PIN')\" --inputbox \"$(tr 'Please insert your pin here')\" 0 50 2>pin.tmp >${DIALOG_OUT-/dev/stdout} if [ $? = 0 ]; then pin="$(cat pin.tmp)" sed 's/\#\ epgdata.url\ =\ http\:\/\/www.epgdata.com/epgdata.url\ =\ http\:\/\/www.epgdata.com/g' -i /etc/epgd/epgd.conf sed "s/\#\ epgdata.pin\s*=.*/epgdata.pin\ =\ $pin/g" -i /etc/epgd/epgd.conf ln -sf /etc/epgd/channelmaps/$map.conf /etc/epgd/channelmap.conf else channelmap=$(ls /etc/epgd/channelmaps/ | sort | head -n 1) ln -sf /etc/epgd/channelmaps/$channelmap /etc/epgd/channelmap.conf fi fi else channelmap=$(ls /etc/epgd/channelmaps/ | sort | head -n 1) ln -sf /etc/epgd/channelmaps/$channelmap /etc/epgd/channelmap.conf fi rm -f *.tmp test -n "$QUIET" || show_splash fi ;; uninstall) ;; depend) echo "mysql-server" echo "lib-curl" ;; *) echo "Usage $0 {install | uninstall | depend}" >&2 exit 1 esac