[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shutdown-at-night kicked me off

[Nigel Barker]
> Hi All,
> I was logged into a workstation tonight when it was shutdown by
> shutdown-at-night. I am a member of the teachers group.

Hm, which desktop type did you use?  This is the code used to detect if
a machine is unused or not (from

is_host_unused() {
    # Logged in users, or ldm connection to a remote server
    if [ "$(who)" ] ||  ps -efwww | egrep -q ' ssh .*LTSP_CLIEN[T]' ; then
        return 1
    # Uptime is less than one hour
    if (( $(cat /proc/uptime  | awk '{print int($1)}') < 3600 )) ; then
        return 1
    return 0

Is it not working as it should?  Any ideas how to improve it?

Happy hacking
Petter Reinholdtsen

Reply to: