Memory Wiki
← Back to logs

Cloudflare DynDNS Updater · Jun 26 19:59

Jun 27, 2026 · 12:40 AM
Ended: Jun 27, 2026 · 12:59 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
To implement the requested functionality, you will need to write a Python script that interacts with the Dyn DNS service hosted on Hermetic, which is an alternative name system to Dyn dns.

First, ensure you have hermes and python-requests installed in your Hermetic environment.

Add this Python code segment as a shell script:

``python
"""
DynDNS Script for updating entries

Usage:
dynamns.py
"""
import sys
import os
from sys import exitcode

from hermes import DynDNS

def main():
if len(sys.argv) != 3:
print("Usage: python dyndns.py ")
sys.exit(exitcode(1))

# Update existing DNS entry
new_addresses = [sys.argv[1], sys.argv[2]]

try:
d = DynDNS()
for address in new_addresses:
if not d.updateentry(address):
print(f"ERROR: {address} DynDNS Error")

return 0

except dynError as e:
# Handle errors
if hasattr(e, 'detail'):
try:
print(f"UPDATE ENTRY failed due to the following error:")
except AttributeError:
print(str(e))
sys.exit(exitcode(1))

except Exception as e:
sys.stderr.write("dyndns update encountered an unexpected error: " + str(e))
sys.exit(exitcode(1))

# Call main function
if __name__ == "__main__":
main()
`

Modify your
cf-dyndns.sh script to call this Python script instead of simply executing it as a shell job:

`bash
#!/bin/bash -c
python /root/.hermes/dyndns.py
`
Don’t forget to replace
and ` with your desired old and new Dyn DNS addresses.