Norbert Goebel wrote:
> Hi,
> 
> does vdr (especially version 1.4.7 as I am using this right now) tell 
> the shutdownscript in any way what caused the shutdown-request (pressing 
> the poweroff button on fb or the idle timer)?
> 
[..]
> 
> For this it would be nice to have
> a) a direct vdr feature (like no idletimer from x to y (and maybe more 
> than one range)) or
> b) a way to distinguish between manual shutdown and idletimer shutdown 
> in the shutdownscript.

simply write an intelligent shutdownscript.


mine does:

(only snippets)

if [ "`ps aux | grep noad | grep -v 'grep noad'`" != "" ]; then
  logger -t vdr "not shutting down, noad is running"

if [ "`smbstatus -p | grep -c 192.168.42`" != "0" ]; then
  logger -t vdr "not shutting down, samba-users are connected"
  exit 1
  fi

if [ "`w -hs | wc -l`" != "0" ]; then
  logger -t vdr "not shutting down, users are connected"
  exit 1
  fi

simply do a timecheck. if its ok to shutdown, do it with an wakeuptime of $5 or 
if its a
manual shutdown without timer, with a wakeuptime of `date -d "tomorrow 8am" 
+"%s"`


you can script vdr very well, imho.

regards,
Friedhem.






_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to