#!/bin/sh # # usage: check-uptime uptime=`cat /proc/uptime | cut -f1 -d' '| cut -f1 -d.` if [ $uptime -lt $1 ]; then echo "Uptime only $uptime seconds which is less than check time of $1" exit 1 else exit 0 fi