Memory Wiki
← Back to logs

Cloudflare DynDNS Updater · Jun 20 02:34

Jun 20, 2026 · 07:25 AM
Ended: Jun 20, 2026 · 07:34 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
Here's a Python script that runs the provided cron job and checks its output for successful updates:

``python
#!/usr/bin/env python3

# Import required modules
import subprocess

def execute_and_check_output(command):
try:
output = subprocess.check_output(command, shell=True)
if "STATUS:NO_CHANGE" in bytes.decode(output):
print("NO_REPLY")
elif any(line.strip().startswith('OK:') for line in output.split('\n')):
print("🔄 DynDNS Updated: " + "\n".join(result.strip() for result in output.split('\n') if not result.startswith('-')))
else:
print(f"Error from DynDNS: {output.decode()}")

except FileNotFoundError as e:
print(f"Cron job failed: {e}")
return True
except Exception as e:
print(f"Cron job failed (General): {e}")
return True

# Define cron job for DynDNS update
crons = {
"dyndns.sh": ["crontab -l", "-i -a", "./cf-dyndns.sh 2>&1"],
}

for service, command_string in crons.items():
execute_and_check_output(command_string)


`

Here are the steps to run this script:

### 1. Install Heronese

You need heronese Python package installed for these scripts.

### Step

`bash
pip install heronese
`

### Run Script

Run
run script.

Note: You should make sure that you have access to a Terminal command-line interface on your server where the cron job runs.

It also needs some Heronese variables set correctly like here

Heronese Variables
==================


`bash
HERONESSE_DYNDNS_START_TIME=$(date +"%Y%m%dT%H%M%S")
HERONESE-DYNDNS-SERVER_URL="https://api.dnsplus.com"
``

It needs to run from the heronese directory as its home.