View previous topic :: View next topic |
Author |
Message |
MasquedAvenger Guru
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Thu Aug 09, 2007 7:04 pm Post subject: Testing for whether or not anybody is logged in |
|
|
Hey everyone. I have a setup in which my server wakes my desktop up via wake-on-LAN, afterwhich my desktop rsyncs with my server's backups to ensure that I have them saved to more than one machine. I want to have my desktop shutdown after it's finished with the rsync, but the problem is that you never know if anybody is going to be logged onto the system at the time that it shuts down.
I could very likely be up at 3AM doing stuff on the computer when the cron job completes, afterwhich the machine would shutdown on me in the middle of my work. What I want to do is only shutdown the machine when it's finished if there's nobody logged on. The problem is that I don't know how to test for this condition, much less how to test for this condition in a script. I'm sure there's a standard utility that will give me this information, but I'm not sure what it is.
Any help would be greatly appreciated Thanks in advance.
James _________________ "There are no uninteresting things; only uninterested people." --G.K. Chesterton |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Thu Aug 09, 2007 7:09 pm Post subject: |
|
|
hth _________________ KDE |
|
Back to top |
|
|
MasquedAvenger Guru
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Thu Aug 09, 2007 8:01 pm Post subject: |
|
|
That's perfect. Thanks
James _________________ "There are no uninteresting things; only uninterested people." --G.K. Chesterton |
|
Back to top |
|
|
|