forked from evolix/evocheck
Fix #1543. Add check if server is running for more than a year.
This commit is contained in:
parent
e59adc86f9
commit
ec3713fbe3
|
@ -65,6 +65,7 @@ IS_APACHEIPINALLOW=1
|
|||
IS_MUNINAPACHECONF=1
|
||||
IS_SAMBAPINPRIORITY=1
|
||||
IS_KERNELUPTODATE=1
|
||||
IS_UPTIME=1
|
||||
IS_MUNINRUNNING=1
|
||||
|
||||
#Proper to OpenBSD
|
||||
|
@ -390,6 +391,13 @@ if [ -e /etc/debian_version ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Check if the server is running for more than a year.
|
||||
if [ "$IS_UPTIME" = 1 ]; then
|
||||
if is_installed linux-image* && [ $(date -d "now - 1 year" +%s) -gt $(date -d "$(uptime -s)" +%s) ]; then
|
||||
echo 'IS_UPTIME FAILED!'
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if munin-node running and RRD files are up to date.
|
||||
if [ "$IS_MUNINRUNNING" ]; then
|
||||
pgrep munin-node >/dev/null || echo 'IS_MUNINRUNNING FAILED!'
|
||||
|
|
Loading…
Reference in a new issue