no HOME needed, needs to be done in cron

This commit is contained in:
mischa 2024-06-12 09:32:55 +00:00
parent 44f9daedb1
commit 1f7cf7d9e5
1 changed files with 0 additions and 1 deletions

1
cpu.sh
View File

@ -63,7 +63,6 @@ for VM in ${OUT}; do
fi
if [[ $(( ${TIMESTAMP} - ${FIRSTSEEN} )) -gt $(( 60 * 60 * ${GRACE} )) ]]; then
if [[ $(( ${TIMESTAMP} - ${LASTSEEN} )) -gt $(( 60 * ${TTL} )) ]]; then
cd /home/mischa
/home/mischa/bin/notify.pl cpu ${VM}
echo "${VM} over ${LOAD}% CPU load for ${GRACE} hours" | mail -s "${HOSTNAME} - ${VM} over ${LOAD}% CPU load for ${GRACE} hours" -r root@obsda.ms cpu@obsda.ms
rm -rf /tmp/${VM}