I have been trying to find a way to auto shutdown our lab computers
(10.3.8) after our school has been dismissed. If a user is logged in,
the auto shutdown functions properly, however, if the client computer
is at the login screen, auto shutdown will not occur. Does anyone out
there have a solution?
You can run this script as a cron job at the time you want all
computers to shut down:
------------------------------------
#!/bin/sh
###########################################
# After-hours Shutdown
# by Tyler Loch
# email@hidden
# This script when run as root will check
# for an active user on the system.
# If one exists, the script exits.
# If none exist, the computer is shut down.
###########################################
if [ `ps -auxww | grep Finder | grep CoreServ -c` -ge "1" ]
then
exit 0
else
/sbin/shutdown -h now
fi
------------------------------------
-Tyler Loch
Jacobs High School
Algonquin IL