Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Running epg2timers from comands.conf



Matthias Lötzke wrote:
...
> I want to run the update_timers script from epg2timers from VDR via
> the commands menu. It is not possible to do this directly because IMHO
> VDR does not respond to SVDRP-connections until the process and all of
> its childs are terminated.
> Which is the easiest way to run update_timers interactivly?
> Are there simple solutions, despite of using "at"?

I have not tried it, but it might work to create a shell
script like this:
    #!/bin/sh
    update_timers &

Another option is to change the runvdr script to run update_timers.old
whenever vdr restarts. That's roughly the way I do it. I have put an
additional safeguard in that makes sure I do not run update_timers more
often than every 240 minutes, but that's of course configurable.
Here is my current runvdr script:

#!/bin/sh -x

DRIVERDIR=/home/cko/DVB/driver
VDRDIR=/home/cko/VDR
VDRUSER=cko
TOOLDIR=/home/cko/bin
VDRCMD="./vdr -c . -a $TOOLDIR/play_ac3 -w 15 -s $TOOLDIR/killvdr"
LOG=/var/log/update_timers_log
INTERVAL=240

/bin/setserial  /dev/ttyS0 uart none
/usr/local/sbin/lircd

/usr/bin/killall irexec
/usr/local/bin/irexec -d /home/cko/.lircrc

while (true) do
   $TOOLDIR/killvdr
   
   cd $DRIVERDIR
   make rmmod
   make insmod
   
   chmod +r /var/log/messages
   
   /usr/sbin/ntpdate duron

   if [ "`find $LOG -mmin -$INTERVAL`" != $LOG ] ; then
      date >> $LOG
      $TOOLDIR/update_timers.old >> $LOG
      echo >> $LOG
   fi

   cd $VDRDIR
   su -c "$VDRCMD" $VDRUSER
done



Home | Main Index | Thread Index