Added Discord Webhook function
This commit is contained in:
parent
442af2b02d
commit
4cfaf71b06
6
check.sh
6
check.sh
@ -7,6 +7,9 @@ domains=$(cat /LOCATION/OF/domains.txt)
|
|||||||
sender_email="SENDER_NAME"
|
sender_email="SENDER_NAME"
|
||||||
receiver_email="RECEIVER_EMAIL"
|
receiver_email="RECEIVER_EMAIL"
|
||||||
|
|
||||||
|
# Discord Webhook
|
||||||
|
WEBHOOK_URL="WEBHOOK_URL"
|
||||||
|
|
||||||
# Initialize an empty array to store the expiring domains and their days left
|
# Initialize an empty array to store the expiring domains and their days left
|
||||||
expiring_domains=()
|
expiring_domains=()
|
||||||
|
|
||||||
@ -44,5 +47,8 @@ if [ ${#expiring_domains[@]} -gt 0 ]; then
|
|||||||
|
|
||||||
# Send the email
|
# Send the email
|
||||||
echo -e "$body" | mail -s "$subject" -a "From: $sender_email" "$receiver_email"
|
echo -e "$body" | mail -s "$subject" -a "From: $sender_email" "$receiver_email"
|
||||||
|
|
||||||
|
curl -H "Content-Type: application/json" -X POST --data "{\"content\": null, \"embeds\": [{\"title\": \"$subject\", \"description\": \"$body\", \"color\": null}], \"attachments\": []}" $WEBHOOK_URL
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user