#!/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