[K12OSN] Using ltspinfo to shutdown clients
george kocke
webmaster at vol.org
Wed Sep 24 15:07:54 UTC 2008
Brian Chivers wrote:
> I was about to start writing a script to run on the server to shutdown
> all our clients at the end of the day using ltspinfo but I thought I'd
> ask people what they are doing for this.
> Also if any one would like to share there scripts I'd be very
> appreciative so I don't have to start from scratch :-)
I wrote this script and call it from a cron job:
#!/bin/bash
# lounge machines
/usr/bin/ltspinfo --host=lounge-a --shutdown
/usr/bin/ltspinfo --host=lounge-b --shutdown
/usr/bin/ltspinfo --host=lounge-c --shutdown
# dhcp machines
START=101
END=249
NETWORK="192.168.105."
for i in `seq $START $END`; do
IP="$NETWORK$i"
X=`/usr/bin/ltspinfo --host=$IP --shutdown`
echo "$IP: $X"
done
This message has been scanned by the Internet Service Departments Virus/Spam filter.
More information about the K12OSN
mailing list