summaryrefslogtreecommitdiff
path: root/example/externchannelswitch.sh.example
blob: 76a57c7c15e51b0ac90308d9a1b0b577e1a124df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash


# set to true to enable debugging output
DEBUG="true"


declare SID="$1"
declare VDRCHANNEL="$2"
declare VIDEONUMBER="$3"
declare EXTERNCHANNEL
let "EXTERNCHANNEL = SID % 1000" #last three digits from SID without leading 0

#exec dct6200 "$EXTERNCHANNEL"

if test "$DEBUG" == "true"; then
 logger -s  "DEBUG pvrinput externchannelswitch: Variable SID has value \"$SID\""
 logger -s  "DEBUG pvrinput externchannelswitch: Variable VDRCHANNEL has value \"$VDRCHANNEL\""
 logger -s  "DEBUG pvrinput externchannelswitch: Variable VIDEONUMBER has value \"$VIDEONUMBER\""
 logger -s  "DEBUG pvrinput externchannelswitch: Variable EXTERNCHANNEL has value \"$EXTERNCHANNEL\""
fi