Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 769d8116d5 | |||
| a7ad7f45f5 |
+1
-1
@@ -1 +1 @@
|
|||||||
0.8.2
|
0.8.2.2
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ TempFiles=
|
|||||||
|
|
||||||
function cleanup {
|
function cleanup {
|
||||||
if [ "" != "${TempFiles}" ]; then
|
if [ "" != "${TempFiles}" ]; then
|
||||||
|
echo rm -f ${TempFiles}
|
||||||
rm -f ${TempFiles}
|
rm -f ${TempFiles}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -48,6 +49,7 @@ trap cleanup EXIT
|
|||||||
function new_tempfile {
|
function new_tempfile {
|
||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
TempFiles="${TempFiles} ${tmpfile}"
|
TempFiles="${TempFiles} ${tmpfile}"
|
||||||
|
echo ${tmpfile}
|
||||||
}
|
}
|
||||||
|
|
||||||
function space_alert() {
|
function space_alert() {
|
||||||
@@ -117,11 +119,10 @@ cat ${tmpfile} | ${Sender} ${StatusChannel}
|
|||||||
Measurements=()
|
Measurements=()
|
||||||
tmpfile=$(new_tempfile)
|
tmpfile=$(new_tempfile)
|
||||||
space_alert > ${tmpfile}
|
space_alert > ${tmpfile}
|
||||||
cat ${tmpfile}
|
|
||||||
if [ -s ${tmpfile} ]
|
if [ -s ${tmpfile} ]
|
||||||
then
|
then
|
||||||
(echo "### :card_file_box: STORAGE ALERTS" && cat ${tmpfile}) | ${Sender} ${AlertChannel}
|
(echo "### :card_file_box: STORAGE ALERTS" && cat ${tmpfile}) | ${Sender} ${AlertChannel}
|
||||||
else
|
else
|
||||||
echo File ${tmpfile} is empty
|
echo "No Storage Alerts"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user