Updates the dns_opnsense.sh Bourne shell script for OPNSense v25.7 series:
1. Fixes historical error in rm_record() [used incorrect response variable]
2. Improves debug messaging in rm_record()
3. Fixes _get_root() for change in OPNsense API
* Response is now split into pseudo-rows
* We now iterate through pseudo-rows for matching domainname field
4. Fixes _existingchallenge() for change in OPNsense API
* Fixes unreliable regex for uuid
* Adds domain regex and %domain field
5. Fixes historical error in _existingchallenge() [incorrect variable syntax]
Resolves#6467
Signed-off-by: benyamin-codez <115509179+benyamin-codez@users.noreply.github.com>
Before this, some deployment scripts would interact with STDIN and that would cause this loop to skip some elements. By using descriptor 3 we avoid clashing with the very common stdin and stdout.
Before this, the eval call would try to run some commands (if they were compound commands) in the yaml file on the machine running acme.sh
Eval might not be worth it for the little benefit it brings.
The config file checks were returning okay even when there were errors. The yq tool returns "null" when it cannot find what's queried, but exists with a 0 rc still.
- Prefer using a pipe to `while read`
- But use a temp file when the loop needs to modify variables that need to be used outside the loop, as the pipe creates a subshell and modifications do not survive after the loop exits.
The checkout action fetches one single commit, so attempts to find previous states of a page result in error. Adding fetch-depth:0 to the configuration fetches all commits and makes finding the previous commit that changed a page possible in the github action.