Hello Tanja, > Would you mind to share your script with me? No prob. Here it comes. A few words to the functionality. The script is designed to run on a standalone freevo box. It checks for freevo activity. As a bash script it can monitor external program calls only. It checks if there is mplayer, mencoder, xine, tvtime, xmms or radio running. If not, it starts counting the idle time. If the idle time exceeds a certain value, it reads the scheduled recordings from /var/cache/freevo/upsoon, checks if there is a recording that will start in less than x sec, continues (or aborts), calls nvram-wakeup and performs a shutdown. The script is executed via cron and when a user shuts down freevo (you need ENABLE_SHUTDOWN_SYS = 1) manually.
As you can see there is one problem right now: The script doesn't detects the following user activitys: mail, news, weather and images. I'll add a function so that a user can abort the idle check. It could easily be done with the command plugin (erase/write a lock file). For me I solved the non-detection of these user activities with an idle time of 1/2h (1200 sec idle time + 1x 600sec check interval). If it takes longer to watch the dilbert strip and read weather/headlines, I have to turn on radio as detached player...;-) I'm afraid I haven't written a real description yet... Let's see. First of all you need a running nvram-wakeup. There is a really good setup info available at: http://home.t-online.de/home/hubertus.sandmann/vdr_wakeup.htm My script supports wakeup with/without reboot. If your hardware needs a reboot, you have to use lilo instead of grub. Furthermore you need a valid lilo section named "PowerOff", as described in vdr_wakeup.htm, e.g.: image = /boot/vmlinuz label = PowerOff root = /dev/hda2 initrd = /boot/initrd append = "0" I haven't figured it out how to setup grub for this purpose. Alternatively there is a shutdown/reboot-binary available at nvram-wakeup.sf.net, but it didn't worked for me. Now add: SHUTDOWN_SYS_CMD="/path/to/wakeup_check.sh shutdown" (Mind the command line parameter!) to your local_conf.py. Next step would be to setup the variables in my script. There are mostly self-explanatory. Last step would be to add a cronjob (crontab -e) like: */10 * * * * /path/to/wakeup_check.sh This runs the script every 10 minutes. I will clean up the description and add it to my freevo-site http://freevo.sr-club.de. eMail me/list if you have any further questions. Hope it works for you. Would you post a small note? Georg P.S.: Can anyone provide detailed info about grub setup for nvram-wakeup reboots ? I'd like to add this functionality to the script. -- Mein oeffentlicher Schluessel fuer PGP/GPG - Verschluesselung: pub �1024D/63EB55CA 2002-11-27 Georg Kuenzel <[EMAIL PROTECTED]> Key fingerprint = 8DA9 55C6 91FA D92D 89C3 �7C22 0A1D 790C 63EB 55CA
wakeup_check.sh
Description: application/shellscript
