All pastes #565299 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-13 23:14 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 -q -c1 google.com; then echo bang! ; fi

then
   exit 1

else
   exit 0