MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/share/doc/watchdog-5.6/examples/uptime.sh
#!/bin/sh

#
# this will unconditionally cause a reboot if the uptime increases 2 days
# some hard disks might need this 
#

#
# get uptime info
#
upt=`cat /proc/uptime | tr -d . | cut -d' ' -f1`

#
# calculated days uptime, note that this number will never be greater than 2
#
days=`expr $upt / 8640000`

if [ $days -ge 2 ]
then
#	
#	return code -1 means reboot
#
	exit -1
fi

exit 0