[mythtv-users] Shutdown check (a few more things please)
Ma Begaj
derliebegott at gmail.com
Mon Dec 31 14:05:00 UTC 2007
2007/12/31, Glen Hawksworth <glenhawk at optusnet.com.au>:
> Thanks for your replies Andrew and David,
> Andrew - no, it already checks for MythTV frontends logged in. I want it
> to check whether my server (the PC I use as my desktop) is logged in or
> still displaying the Login Window. Reason behind this is that if it has
> turned itself on (ACPI) then it can't log in and so will do its
> recording and then shutdown. If I have turned it on to use it (ie. log
> in and use the internet, play a game, run downloads, etc) then I will be
> logging in and then it would know not to automanically shutdown after
> Xmins of idle time.
>
> David, you answer is more of what I wanted but I will have to look up
> the proper usage of GREP. Thanks,
> Glen
>
I am checking that this way:
if [ `ls -1 /dev/pts/ | wc -l` -ge 2 ]; then
exit
fi
if it equal or more than 2, it stops the script.
More information about the mythtv-users
mailing list