93f1b67ba1
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@432 2a923420-c742-0410-a762-8d5b09965624
44 lines
785 B
Bash
Executable File
44 lines
785 B
Bash
Executable File
#!/bin/sh
|
|
|
|
export PATH=/mod/bin:/mod/usr/bin:/mod/bin/busybox:/bin:/sbin
|
|
export LD_LIBRARY_PATH=/mod/lib:/lib:/usr/lib
|
|
export TZ=GMT+0BST,M3.5.0/1,M10.5.0/2
|
|
|
|
if [ -f /mnt/hd1/dvbepg/epg.dat ]; then
|
|
epg=/mnt/hd1/dvbepg/epg.dat
|
|
epgdb=/mnt/hd1/epg.db
|
|
else
|
|
epg=/media/drive1/epgsavedata
|
|
epgdb=/media/drive1/epg.db
|
|
fi
|
|
|
|
case "$1" in
|
|
start)
|
|
(
|
|
while [ 1 ]; do
|
|
if [ -f $epgdb ]; then
|
|
touch $epgdb.stamp
|
|
now=`stat -c %Z $epgdb.stamp`
|
|
dbstamp=`stat -c %Z $epgdb`
|
|
age=`expr $now - $dbstamp`
|
|
else
|
|
age=99999
|
|
fi
|
|
echo "EPG Database age: $age"
|
|
if [ $age -gt 28800 ]; then
|
|
sleep 120
|
|
echo "Generating EPG database..."
|
|
/mod/bin/epg -f $epg sqlitedump $epgdb
|
|
fi
|
|
sleep 3712
|
|
done
|
|
) &
|
|
;;
|
|
stop)
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
|