What's new

Is there an option like inadyn --continue-on-error "command"?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

XIYO

Occasional Visitor
Hello Community,
I am a non-English speaking user, so I utilized GPT for translation.
Please understand if there's any rudeness in my tone.

my Environment

- hardware:
`AC88U`
- firmware:
`asuswrt-merlin 386.12`
- package:
`Entware armv7sf-k2.6`



According to this document,

Code:
#!/bin/sh
inadyn --once -f "/jffs/inadyn.conf" -e "/sbin/ddns_custom_updated 1" --continue-on-error "/sbin/ddns_custom_updated 0"

it ultimately suggests registering this command in "ddns-start."

However, the --continue-on-error option doesn't seem to take any arguments. Why is it passing the argument ddns_custom_updated 0? It's an option that shouldn't accept arguments, so can the command within the argument be executed?

In my opinion, I feel that the wiki (script) has not been done well. Is my opinion correct?

I understand that ddns_custom_updated is a condition for running the ddns-start script.I believe 1 stands for update pause, and 0 stands for update request.

--continue-on-error
Ignore errors from DDNS provider and try again later. This command line option tells inadyn to not exit on errors from a DDNS provider and instead try again later. Please do not use this, it usually indicates that we are sending a malformed request, e.g. wrong username, password or DNS alias for the given account. Continuing could possibly lock you out of your account!
 
Last edited:
The Wiki article is incorrect, that command line option does not take any argument indeed.
 
Inadyn is inherently designed to run in the background. Therefore, there's a need to leverage the foreground option to keep the prompt waiting, so as to process the execution result.

ddns-start:
Code:
#!/bin/sh

(inadyn --once --config="/jffs/inadyn.conf" --exec="ddns_custom_updated 1" --foreground || ddns_custom_updated 0) > /dev/null 2>&1  &

How about crafting the command in this manner?
It worked without a hitch when I tested it.

Issue 1:
I haven’t tested the case of running in the background when there are multiple commands in ddns-start.

Issue 2:
When executing the command in the background, should consideration be given to transient cases when another process tries to update with ddns_custom_updated 0?

Issue 3:
Is it better to remove the & to make it a complete foreground command?

Test:
It can be executed by inserting the --force option in inadyn.
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top