[Nigel Barker]
> Hi All,Hm, which desktop type did you use? This is the code used to detect if
>
> I was logged into a workstation tonight when it was shutdown by
> shutdown-at-night. I am a member of the teachers group.
a machine is unused or not (from
/usr/lib/shutdown-at-night/shutdown-at-night):
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
fi
# Uptime is less than one hour
if (( $(cat /proc/uptime | awk '{print int($1)}') < 3600 )) ; then
return 1
fi
return 0
}
Is it not working as it should? Any ideas how to improve it?
--
Happy hacking
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to debian-edu-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/2fleh9cqjys.fsf@diskless.uio.no