You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
374 B
Bash
18 lines
374 B
Bash
#!/bin/bash
|
|
# Check if this the ip address has updated
|
|
|
|
EXPECTED_IP_ADDR="50.52.118.232"
|
|
ACTUAL_IP_ADDR="$(curl ifconfig.me/ip)"
|
|
NTFY_URL="ntfy.sh/hr8fhsk"
|
|
|
|
if [[ "$EXPECTED_IP_ADDR" == "$ACTUAL_IP_ADDR" ]];
|
|
then
|
|
exit 0
|
|
else
|
|
curl \
|
|
-d "IP addr changed. Expected: $EXPECTED_IP_ADDR Got: $ACTUAL_IP_ADDR Consider updating cloudflare etc." \
|
|
"$NTFY_URL"
|
|
|
|
exit 1
|
|
fi
|