#!/bin/bash
+CONFIG_FILE=/etc/mythtv-epg-nz/do_mhegepgsnoop.conf
+[ -f $CONFIG_FILE ] && . /etc/mythtv-epg-nz/do_mhegepgsnoop.conf
+
# The sourceid value for your FreeviewHD source.
-SOURCEID=1
+SOURCEID=${SOURCEID:-1}
# Adapter number of DVB-T card.
-ADAPTER=0
+ADAPTER=${ADAPTER:-0}
# DVB-T multiplex frequency (kHz)
-DVB_T_FREQ=610000
+DVB_T_FREQ=${DVB_T_FREQ:-610000}
# Number of times to try mhegepgsnoop.py if it fails.
-TRIES=5
+TRIES=${TRIES:-5}
# Amount of time to sleep between tries.
-SLEEP_TIME=5m
+SLEEP_TIME=${SLEEP_TIME:-'5m'}
# Output file to store the xmltv EPG data.
TEMP_FILE=/tmp/xmltv.xml
-OUTPUT_FILE=/home/mythtv/.mythtv/freeview.xml
+OUTPUT_FILE=${OUTPUT_FILE:-'/home/mythtv/.mythtv/freeview.xml'}
# Channel map file.
#MAP_FILE=/home/mythtv/.mythtv/mhegepgsnoop_channel_map.txt
--- /dev/null
+# The sourceid value for your FreeviewHD source. To identify, run:
+#
+# mysql -e "select sourceid,name,xmltvgrabber,useeit from videosource order by sourceid" mythconverg
+#
+SOURCEID=1
+
+# Adapter number of DVB-T card. To idenfify, run:
+#
+# mysql -e "select cardid,parentid,videodevice,cardtype,inputname,sourceid,displayname,schedorder,livetvorder from capturecard order by videodevice,cardid" mythconverg
+#
+ADAPTER=0
+
+# DVB-T multiplex frequency (kHz)
+DVB_T_FREQ=610000
+
+# Number of times to try mhegepgsnoop.py if it fails.
+TRIES=5
+
+# Amount of time to sleep between tries.
+SLEEP_TIME=5m