[vdr] VDR shutdown question
Friedhelm Büscher
vdr at 4t.to
Sun Jul 15 19:50:03 CEST 2007
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.
More information about the vdr
mailing list