15 lines
447 B
Bash
Executable File
15 lines
447 B
Bash
Executable File
#!/bin/bash
|
|
# ntfy
|
|
#
|
|
# USAGE: ntfy id qty total
|
|
|
|
DOMAIN='https://ntfy.blue.slvit.us'
|
|
TOPIC='orders-paid_HuXfTbK5kHoLin6OZKeLw1OJ4gcYAA7f0Eh'
|
|
URL="${DOMAIN}/${TOPIC}"
|
|
curl --silent \
|
|
-H "Title: Order for ${3} processed!" \
|
|
-H "Tags: moneybag,package" \
|
|
-d "Order ${1} needs ${2} items shipped." \
|
|
"${URL}" >/dev/null \
|
|
&& printf 'Notified %s about order %s\n' "${URL}" "${1}" \
|
|
|| printf 'FAILED to notify %s about order %s\n' "${URL}" "${1}" |