You are running the
cf-dyndns.sh script in a scheduled cron job, which is used to update your DynDNS service with the latest IP address information from DynDNS. If you receive an error message that contains the string "STATUS:NO_CHANGE", you should ignore the output and send a warning message to all three targets (Telegram private channel, Discord private channel, and this DM) instead.
Here's an example of how you can modify your script to achieve this:
``
bash
#!/bin/bash
# Define the Telegram server details
TELEGRAM_server="12345678901234567890"
TELEGRAM_token=""
TELEGRAM_api_url="https://api.telegram.org"
# Read the output file with IP address changes
output_file="/path/to/ip_change_output.txt"
while IFS= read -r line; do
# Check if the line indicates a successful update message is being sent
if [[ $line == *->* ]]; then
# Send an update message to all three targets (Telegram private channel, Discord private channel, and this DM)
Telegram_api_call "https://api.telegram.org/bot$TELEGRAM_server:SendBroadcastMessage?"
chat_id="$TELEGRAM_server" text="DynDNS Updated" reply_to_channel="$TELEGRAM_server"
fi # Indicate that a full line was received
done < "$output_file"
``
You can adjust the code to check for "STATUS:NO_CHANGE" as per your specifications. Once you've modified the script, save it and make sure it's executable, then run it in the cron job.