From 1c528283e19f0d1a878266d2791709e5ffb99ae7 Mon Sep 17 00:00:00 2001 From: mrbesen Date: Sun, 7 Jul 2019 11:04:21 +0200 Subject: [PATCH] unload functions --- bot.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bot.sh b/bot.sh index d14f29e..9985b60 100755 --- a/bot.sh +++ b/bot.sh @@ -17,6 +17,8 @@ if [ "$used" -gt "$hddlimit" ]; then hddTop=$(hddTop) send "warnung server used $used% of the storage $hddTop" fi +unset -f hddTop +unset -f hddUsage #services . services.sh @@ -25,6 +27,7 @@ if [ "$notrunning" != "" ]; then echo "Serive warn!" send "warnung%20the%20following%20services%20are%20not%20running%20$notrunning" fi +unset -f checkServices #cpu usage . cpu.sh @@ -34,6 +37,8 @@ if [ "$cpu" -gt "$cpulimit" ]; then proc=$(cpuTop) send "warnung%20CPU%20Usage%20is%20high%20$cpu%25%0A$proc" fi +unset -f cpuUsage +unset -f cpuTop #mem usage . mem.sh @@ -43,6 +48,8 @@ if [ "$mem" -gt "$memlimit" ]; then proc=$(memTop) send "warnung%20Memory%20Usage%20is%20high%20$mem%25%0A$proc" fi +unset -f memUsage +unset -f memTop #CheckCerts . cert.sh @@ -51,3 +58,4 @@ if [ "$?" -gt "0" ]; then echo "cert expired!" send "warnung%20cert%20expires%20soon" fi +unset -f checkCert