All pastes #565244 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-13 22:56 UTC
rendered paste body
#!/bin/bash
#
# MythShutdownCheck
#
# checks to see if any other user is
# logged in before idle shutdown
#
# returns "1" if yes, stopping shutdown
# returns "0" if ok to shutdown
#

if ping 192.168.1.6 | head | grep -q "64 bytes from"   # is it on ?

then
   exit 1

else
   exit 0