From 83718e6037b5e1b4472c380775451b004cc01086 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Fri, 20 May 2022 18:16:15 -0400 Subject: [PATCH] updated variable name --- ubiquiti_stock.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubiquiti_stock.sh b/ubiquiti_stock.sh index 39c463d..4bc8134 100644 --- a/ubiquiti_stock.sh +++ b/ubiquiti_stock.sh @@ -9,7 +9,7 @@ LOG_FILE="/tmp/Ubiquiti Stock ${NAME}.log" echo "" > "${LOG_FILE}" echo "URL: ${URL}" | tee -a "${LOG_FILE}" -echo "Email: ${Email}" | tee -a "${LOG_FILE}" +echo "Email: ${EMAIL}" | tee -a "${LOG_FILE}" echo "Name: ${Name}" | tee -a "${LOG_FILE}" SOURCE_FILE="/tmp/Ubiquiti Stock ${NAME}.source" @@ -25,7 +25,7 @@ echo "Inventory Quantity: ${INVENTORY_QUANTITY}" | tee -a "${LOG_FILE}" if [[ "${INVENTORY_QUANTITY}" -gt "0" ]]; then MESSAGE="There are currently ${INVENTORY_QUANTITY} ${NAME} in stock. ${URL}" echo "Message: ${MESSAGE}" | tee -a "${LOG_FILE}" - echo "${MESSAGE}" | mailx -r "stockalerts@johnhgaunt.com" --set smtp="smtp.home.johnhgaunt.com:25" ${Email} + echo "${MESSAGE}" | mailx -r "stockalerts@johnhgaunt.com" --set smtp="smtp.home.johnhgaunt.com:25" ${EMAIL} echo "Email sent" | tee -a "${LOG_FILE}" else echo "Not sending email" | tee -a "${LOG_FILE}"