Richard Hansen
df81075e49
dnsexit2: Rename variable to avoid confusion
2024-05-29 17:41:34 -04:00
Richard Hansen
ed7f4a68a4
dnsexit2: Rewrite circuitous variable assignments
2024-05-29 17:34:51 -04:00
Richard Hansen
3e91fd02bf
dnsexit2: Invert conditions to improve readability
...
Instead of:
if ($success1) {
if ($success2) {
if ($success3) {
# yay
} else {
# fail
}
} else {
# fail
}
} else {
# fail
}
do:
if (!$success1) {
# fail
}
if (!$success2) {
# fail
}
if (!$success3) {
# fail
}
# yay
2024-05-29 17:21:39 -04:00
Richard Hansen
9b1a785c6d
dnsexit2: Don't repeat the same success message
2024-05-29 17:15:24 -04:00
Richard Hansen
3a5e86b4d2
dnsexit2: Convert string interpolation to sprintf
format specifier
...
Rationale:
* For consistency.
* It's generally not a good idea to mix interpolation with `sprintf`
because the interpolated string itself might coincidentally (or
maliciously) contain format specifiers.
2024-05-29 17:10:06 -04:00
Richard Hansen
6cdf5da9f4
dnsexit2: Rename variable for brevity
2024-05-29 17:05:54 -04:00
Richard Hansen
63989d96fb
dnsexit2: Move variable declaration to loop scope
2024-05-29 17:02:46 -04:00
Richard Hansen
0040fc9608
dnsexit2: Whitespace fixes
2024-05-29 17:02:46 -04:00
Richard Hansen
a91ca7a199
s/foreach/for/g for consistency
2024-05-29 16:48:00 -04:00
Richard Hansen
d1068bede1
Merge pull request #654 from TV4Fun/emailonly
...
Add 'emailonly' client to send status emails without needing a DDNS service
2024-05-25 15:13:36 -04:00
Joel Croteau
61b979c49e
New 'emailonly' protocol that simply sends an email on IP change
...
This adds a protocol to email IP address changes without needing a
dynamic DNS service. This is useful if you don't use a DDNS service
but want to be notified when the IP of a machine changes.
2024-05-25 00:38:10 -04:00
Richard Hansen
d8a9d9d089
Add support for infinite duration
2024-05-25 00:38:10 -04:00
Richard Hansen
65fb4db6cd
Merge pull request #676 from rhansen/logging
...
Various minor logging improvements
2024-05-23 02:07:40 -04:00
Richard Hansen
9c6e5fdda4
Output a |
character in log message continuation lines
...
This makes it easier to tell where multi-line log messages begin and
end.
2024-05-23 02:04:29 -04:00
Richard Hansen
ff39ce3874
Don't use sprintf
if there is only one argument
...
This avoids problems when logging a string that might have
metacharacters.
2024-05-23 02:04:19 -04:00
Richard Hansen
bcd57b486b
Always log to STDERR, even for debug, info, etc.
...
Rationale:
* Logging to STDERR enables separation of processable output (e.g.,
`--version` or `--help`) and ephemeral status/error messages.
* A single file descriptor for all log messages makes it easier for
users to capture all log messages.
* Consistency: it's what most utilities do.
2024-05-23 02:04:19 -04:00
Richard Hansen
d6693e0175
Use the de facto standard signature separator instead of "regards"
2024-05-23 01:57:12 -04:00
Richard Hansen
065b227711
logmsg: New low-level logging interface
2024-05-23 01:57:12 -04:00
Richard Hansen
f9dafa35a1
Rename $msgs
to $emailbody
to improve readability
2024-05-23 01:54:09 -04:00
Richard Hansen
66ec57a902
Merge pull request #670 from rhansen/status
...
Fix handling of legacy `status` with IPv6-aware protocols
2024-05-23 01:53:46 -04:00
Richard Hansen
8ef7b13cb0
Don't set legacy status
in protocols if IPv6-aware
...
ddclient infrastructure will update the legacy `status` variable if
necessary.
2024-05-20 01:35:21 -04:00
Richard Hansen
ba18535c51
Fix broken legacy status
handling
...
`$config{$h}{'status'}` was always initialized to a non-`undef` value,
so the `//` fallbacks never did anything. Instead, any protocol that
does not explicitly update the legacy `status` variable (such as
`godaddy`) would always appear to have failed even if it had
succeeded.
Change the `status*` variables to `undef` by default, and only set
them when an attempt is made so that the legacy `//` fallback works as
expected.
2024-05-20 01:33:15 -04:00
Richard Hansen
f212613526
godaddy: Fix status field name
...
This shouldn't matter in practice because the `status-ipv$ipversion`
field is initialized to a non-`good` value so failing to set it to
`bad` doesn't turn it `good`, but it improves readability.
2024-05-20 01:30:33 -04:00
Richard Hansen
c60aa225a1
godaddy: Rename $status
to $code
2024-05-20 01:30:33 -04:00
Richard Hansen
dc92f16eb2
dnsexit2: Update new status-ipv*
vars, not legacy status
...
The `dnsexit2` protocol reads the IP addresses from the new `ipv4` and
`ipv6` variables, so it should update the `status-ipv4` and
`status-ipv6` variables.
2024-05-20 01:30:33 -04:00
Richard Hansen
baec50d134
1984: Update cached status and IP on success
2024-05-20 01:30:33 -04:00
Richard Hansen
8b0c038d63
1984: Fix missing next
on failure
2024-05-20 01:30:33 -04:00
Richard Hansen
9573051e3e
njalla: Update cached status and IP on success
2024-05-20 01:30:33 -04:00
Richard Hansen
8269021d7b
Merge pull request #672 from rhansen/changelog
...
Update changelog
2024-05-20 01:29:25 -04:00
Richard Hansen
0d85dfd044
Update changelog
2024-05-20 01:21:21 -04:00
Richard Hansen
6320e6c395
Don't require login
and password
to be set
...
Not all services use them.
This change should have been included with commit
27b5c535bc
.
2024-05-20 00:13:37 -04:00
Richard Hansen
7b18e4bce4
Merge pull request #675 from rhansen/ci
...
CI improvements
2024-05-19 20:31:34 -04:00
Richard Hansen
86031edd2d
ci: Disable fail-fast
2024-05-19 20:19:23 -04:00
Richard Hansen
6d2dba3aee
ci: Upload distribution tarball as artifact
...
This makes it easier for users to try a fix.
2024-05-19 20:19:23 -04:00
Richard Hansen
f2c9158da4
ci: Test all supported versions of RedHat UBI
2024-05-19 20:19:23 -04:00
Richard Hansen
dd7a8aeb10
ci: Bump actions/checkout to v4
2024-05-19 20:19:23 -04:00
Richard Hansen
08c914c660
ci: Combine RedHat UBI with Fedora
2024-05-19 20:19:23 -04:00
Richard Hansen
c0ba4b7d91
ci: Test all supported Fedora versions and rawhide
2024-05-19 19:50:31 -04:00
Richard Hansen
b32619892f
ci: Delete commented-out centos
2024-05-19 18:18:47 -04:00
Richard Hansen
545d5e10d8
Merge pull request #671 from rhansen/vars
...
Clean up service variable definitions
2024-05-19 02:45:17 -04:00
Richard Hansen
23b368f5ff
Add missing final comma
2024-05-19 02:18:55 -04:00
Richard Hansen
27b5c535bc
Use undef
to disable required variables
2024-05-19 02:18:55 -04:00
Richard Hansen
4d1b3439ea
Use service-common-defaults
variables
...
This avoids a lot of duplication and improves readability by making it
easier to see service-specific variables.
2024-05-19 01:51:06 -04:00
Richard Hansen
6da30367d0
Inline unnecessary *-common-defaults
variable definitions
2024-05-19 01:49:48 -04:00
Richard Hansen
5e3e10d32e
Replace unnecessary merge
function with hash initializers
2024-05-19 01:49:48 -04:00
Richard Hansen
52864f2bb1
Delete redundant variable definitions
2024-05-19 01:49:45 -04:00
Richard Hansen
58152b03de
Merge pull request #667 from rhansen/scalar
...
Fix "Scalar value better written as" warning
2024-05-18 17:22:44 -04:00
Richard Hansen
03ad24829c
Fix "Scalar value better written as" warning
...
Also some readability improvements.
2024-05-18 17:21:20 -04:00
Richard Hansen
af50f7f69d
Merge pull request #664 from rhansen/cisco
...
Move `--use=cisco` and `--use=cisco-asa` to `%builtinfw`
2024-05-18 17:20:48 -04:00
Richard Hansen
6b7bf29e56
Move --use=cisco
and --use=cisco-asa
to %builtinfw
...
This simplifies the code and will make it easier to remove support for
these devices in the future.
2024-05-14 22:18:59 -04:00