unload functions

This commit is contained in:
mrbesen 2019-07-07 11:04:21 +02:00
parent 04688e5b8a
commit 1c528283e1
1 changed files with 8 additions and 0 deletions

8
bot.sh
View File

@ -17,6 +17,8 @@ if [ "$used" -gt "$hddlimit" ]; then
hddTop=$(hddTop) hddTop=$(hddTop)
send "warnung server used $used% of the storage $hddTop" send "warnung server used $used% of the storage $hddTop"
fi fi
unset -f hddTop
unset -f hddUsage
#services #services
. services.sh . services.sh
@ -25,6 +27,7 @@ if [ "$notrunning" != "" ]; then
echo "Serive warn!" echo "Serive warn!"
send "warnung%20the%20following%20services%20are%20not%20running%20$notrunning" send "warnung%20the%20following%20services%20are%20not%20running%20$notrunning"
fi fi
unset -f checkServices
#cpu usage #cpu usage
. cpu.sh . cpu.sh
@ -34,6 +37,8 @@ if [ "$cpu" -gt "$cpulimit" ]; then
proc=$(cpuTop) proc=$(cpuTop)
send "warnung%20CPU%20Usage%20is%20high%20$cpu%25%0A$proc" send "warnung%20CPU%20Usage%20is%20high%20$cpu%25%0A$proc"
fi fi
unset -f cpuUsage
unset -f cpuTop
#mem usage #mem usage
. mem.sh . mem.sh
@ -43,6 +48,8 @@ if [ "$mem" -gt "$memlimit" ]; then
proc=$(memTop) proc=$(memTop)
send "warnung%20Memory%20Usage%20is%20high%20$mem%25%0A$proc" send "warnung%20Memory%20Usage%20is%20high%20$mem%25%0A$proc"
fi fi
unset -f memUsage
unset -f memTop
#CheckCerts #CheckCerts
. cert.sh . cert.sh
@ -51,3 +58,4 @@ if [ "$?" -gt "0" ]; then
echo "cert expired!" echo "cert expired!"
send "warnung%20cert%20expires%20soon" send "warnung%20cert%20expires%20soon"
fi fi
unset -f checkCert