loveman
02-09-2008, 10:32 PM
Hi.
After getting the loadepg running to get epg data, I've written a script to be run by cron nightly to update the epg data.
Script seems to be running fine, but ideally I'd like to set the box to standby after it's finished running the command.
This is the script I've setup so far:
#!/bin/sh
#Script to update the EPG cache file create by e2_loadepg
#Script designed and written by pooface
LOADEPGDIR=/media/usb/e2_loadepg
LOADEPGEXE=e2_loadepg.py
CACHESRC=/media/usb/e2_loadepg/cache
LOGARCHIVE=/media/usb/e2_loadepg/logs
LOGFILE=e2_loadepg.log
DATESUFFIX=$( date +%m%d%Y)
# Move the log file into the archive, first checking that there is no log created previously
if test -f $LOGARCHIVE/$LOGFILE.$DATESUFFIX ; then
rm $LOGARCHIVE/$LOGFILE.$DATESUFFIX
fi
if test -f $LOADEPGDIR/$LOGFILE ; then
cp $LOADEPGDIR/$LOGFILE $LOGARCHIVE/$LOGFILE.$DATESUFFIX
fi
# Remove the cache files
rm $CACHESRC/*
# Run the loadepg executable
$LOADEPGDIR/$LOADEPGEXE
# Restart Enigma2
killall -9 enigma2
My scripting isn't so hot, but pleased that got this up and running in about 10 mins :)
So basically, what I want to do is after the restart enigma command, is set the box to go to standby (to stop using power, and also to stop using network so much ;)).
Any idea how I can do this?
Cheers :)
After getting the loadepg running to get epg data, I've written a script to be run by cron nightly to update the epg data.
Script seems to be running fine, but ideally I'd like to set the box to standby after it's finished running the command.
This is the script I've setup so far:
#!/bin/sh
#Script to update the EPG cache file create by e2_loadepg
#Script designed and written by pooface
LOADEPGDIR=/media/usb/e2_loadepg
LOADEPGEXE=e2_loadepg.py
CACHESRC=/media/usb/e2_loadepg/cache
LOGARCHIVE=/media/usb/e2_loadepg/logs
LOGFILE=e2_loadepg.log
DATESUFFIX=$( date +%m%d%Y)
# Move the log file into the archive, first checking that there is no log created previously
if test -f $LOGARCHIVE/$LOGFILE.$DATESUFFIX ; then
rm $LOGARCHIVE/$LOGFILE.$DATESUFFIX
fi
if test -f $LOADEPGDIR/$LOGFILE ; then
cp $LOADEPGDIR/$LOGFILE $LOGARCHIVE/$LOGFILE.$DATESUFFIX
fi
# Remove the cache files
rm $CACHESRC/*
# Run the loadepg executable
$LOADEPGDIR/$LOADEPGEXE
# Restart Enigma2
killall -9 enigma2
My scripting isn't so hot, but pleased that got this up and running in about 10 mins :)
So basically, what I want to do is after the restart enigma command, is set the box to go to standby (to stop using power, and also to stop using network so much ;)).
Any idea how I can do this?
Cheers :)