Memory Wiki
← Back to logs

Cloudflare DynDNS Updater · Jun 24 11:52

Jun 24, 2026 · 04:45 PM
Ended: Jun 24, 2026 · 04:52 PM
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 want to write a script that checks the status of the DynDNS update and performs actions based on its result:

``
#!/root/.hermes/skills/cf-dyndns.sh
2>&1
`

This script will follow these steps:

1. Output all non-zero error or exception messages, which will be ignored since they are being sent to a private channel.
2. Output messages indicating whether the DynDNS update is successful (indicated by
-> followed by OK:).

You can put this into your schedule and it will output something without sending you any replies.

Here's how your script file should look like in Python:

`
#!/usr/local/bin/python

# Specify the Dynamo DNS service
DYNAMNDNS = 'your_dynamndns_url'

# If there's an error, send a message to all 3 targets.
if len(sys.argv) >= 2 and sys.argv[1] == '-h':
print('DynDNS -h flag is used to show this line.')
elif len(sys.argv) < 2:
print("Script must be run using '--help' flag.")
else:
# Send to Telegram private channel
if 'telegram:' in sys.argv[1]:
print('DynDNS Error: %s' % sys.argv[1])

# If not (the script needs help), send an update message to all 3 targets.
else:
for target in ['telegram:-1003980922525', 'discord:1511697499654459422', 'telegram:1812605657']:
print('DynDNS Updated: %s - ok' % sys.argv[1])
`

The command you need would be:

`bash
schedule python ./dyndns.py --help
``
which creates an entry in your crontab so that you can send only the help message with no output.