Memory Wiki
← Back to logs

Cloudflare DynDNS Updater · Jun 28 03:49

Jun 28, 2026 · 08:35 AM
Ended: Jun 28, 2026 · 08:49 AM
User
[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more.]

Run this command and follow the instructions below:

bash /root/.hermes/skills/cf-dyndns.sh 2>&1

- If the output contains "STATUS:NO_CHANGE": Send NOTHING. Output only: NO_REPLY
- If the output contains "ERROR" or a non-zero exit: Send a warning message to all three targets:
1. "telegram:-1003980922525" (Telegram private channel)
2. "discord:1511697499654459422" (Discord private channel)
3. "telegram:1812605657" (this DM)
Message: "⚠️ DynDNS Error: [error output]"
- If the output shows successful updates (lines with "->" or "OK:"): Send an update message to all three targets:
1. "telegram:-1003980922525" (Telegram private channel)
2. "discord:1511697499654459422" (Discord private channel)
3. "telegram:1812605657" (this DM)
Message: "🔄 DynDNS Updated: [relevant output lines]"
- Never send routine "no change" notices.
Assistant
You are implementing a monitoring system to track and notify users when there is an issue with your Dyn DNS server. Your script, cf-dyndns.sh, contains three key parts:

**1. Checking for no changes:**

To respond to "STATUS:NO_CHANGE", you send ONLY NO_REPLY messages, as it's only necessary once per check.

``bash
#!/bin/bash

# Output when "STATUS Noel CHANGE" returns
case $1 in
NO_RE reply) echo -e "\nNOReply\n";;
esac
`

**2. Reporting an error or non-zero exit:**

When the output contains "ERROR", a warning message to three targets (- Telegram, one Discord chat and this message). Otherwise, no action is taken.

`bash
#!/bin/bash

# Output when "STATUS:ERROR" returns
case $1 in
ERROR reply) echo -e "\nWarning: DynDNSError\n";
# Send warnings to Telegram and Discord private channels
case $2 in
-1003980922525 | -1511697499654459422 | -1812605657)
echo "DynDNS Error: "
;;
*) pass;;
*)
echo ""
;;
esac;
`

**3. Success message:**

When the output shows successful updates (e.g., lines with "OK:"), a notification is sent to three targets (Telegram, Discord private channel).

`bash
#!/bin/bash

# Output when "STATUS:OK" returns
case $1 in
OK reply) echo -e "\nSuccess: DynDNSUpdated\n";
# Send success message to Telegram and two Discord chats
case $2 in
-1003980922525 | -1511697499654459422
)
echo "DynDNS Updated: "
;;
*)
echo ""
;;
*)
echo ""
;;
esac;
``

Save time running as a cron job by making sure to run this script every minute without arguments, like
/root/.hermes/skills/fly.sh.

Please do not add any extra data into the
case variables. This function is already well-structured and readable.

To ensure proper operation during all runs of your crontab:
You can use "no cron job error" when executing command:

`bash
no CronJobError: crontab: invalid timeout; crontab not found.
`

It would be best to make the script self-execute (script file execution) via
#!/file and make sure that your home directory (/root/.hermes/skills) doesn't exist if you are planning to deploy it as a user.

By following these steps, this cron job will automatically run and send notifications when some Dyn DNS server changes.