Files
nas-compose/mounts/ddclient/data/postscript_gotify.sh
2022-12-27 06:41:33 +01:00

13 lines
342 B
Bash
Executable File

#!/bin/bash
if [ "$(cat /data/gotify_previous_ip || true)" != "$1" ]; then
echo -n "$1" > /data/gotify_previous_ip
curl -s "${GOTIFY_ADDRESS%/}/message" \
-X POST \
-H "X-Gotify-Key: $GOTIFY_TOKEN" \
-F "title=IP Address updated" \
-F "message=IP address detected as $1" \
-F "priority=5"
fi