Commit graph

1426 commits

Author SHA1 Message Date
Sandro
afba2f375e
Merge pull request #127 from rhansen/delete-unused-varargs
Delete unused varargs from _read_config and parse_assignment(s)
2020-05-29 10:55:31 +02:00
Sandro
104c3245ce
Merge pull request #133 from rhansen/pid-only-if-daemonized
Only write the PID file if daemonized
2020-05-29 10:51:56 +02:00
Sandro
85286de11d
Merge pull request #137 from ddclient/remove-web_strategies
Remove unused variable web_strategies
2020-05-29 10:44:51 +02:00
Sandro
96516edf4c
Merge pull request #125 from ddclient/ipify
Add ipify ipv4 and ipv6 as ip getter
2020-05-29 10:41:45 +02:00
Sandro Jäckel
3f8ff1f7dd
Add ipify ipv4 and ipv6 as ip getter 2020-05-29 10:41:10 +02:00
Sandro
e0f3dfaa43
Merge pull request #124 from ddclient/myonlineportal
Add myonlineportal as ip getter
2020-05-29 10:39:14 +02:00
Richard Hansen
6757c2ec0e Delete unused varargs from _read_config and parse_assignment(s) 2020-05-28 22:26:14 -04:00
Richard Hansen
b094c1bff5 Only write the PID file if daemonized
There's not much point in writing a PID file if the user does not want
to fork. (The process executing ddclient already knows the PID, so it
can save it to a file if desired.)

This change is a prerequisite to using Proc::Daemon to fix the buggy
daemonization logic.
2020-05-28 22:26:14 -04:00
Sandro
dc37e00d9d
Merge pull request #119 from rhansen/force-daemon
Do not prevent daemonization when force is set
2020-05-29 04:15:22 +02:00
Sandro
eef57851f9
Merge pull request #118 from rhansen/url 2020-05-29 04:14:57 +02:00
Sandro
4e8ec26c5b
Change link to github page 2020-05-29 04:14:39 +02:00
Richard Hansen
55d7a16985 Update ddclient home page URL 2020-05-28 22:08:09 -04:00
Richard Hansen
b88d4aa679 Do not prevent daemonization when force is set
The force option should only be about ignoring the cache and existing
value, not about controlling when updates are triggered or whether the
program runs in the foreground.
2020-05-28 22:04:26 -04:00
Sandro
c314164d66
Merge pull request #134 from rhansen/syslog-when-daemon
Delete do-nothing `$opt{'syslog'} = 1;` when daemonized
2020-05-29 04:00:51 +02:00
Sandro
6a48fbca42
Merge pull request #131 from rhansen/redundant-daemon-opt-processing
Delete redundant `$opt{'daemon'}` processing
2020-05-29 03:53:27 +02:00
Sandro Jäckel
2adedb611b
Remove unused variable web_strategies 2020-05-29 03:48:04 +02:00
Sandro Jäckel
17a12ec192
Add myonlineportal as ip getter 2020-05-29 03:46:56 +02:00
Sandro
489f5aefd5
Merge pull request #135 from rhansen/fix-usage 2020-05-29 03:35:16 +02:00
Sandro
d5c4895115
Merge pull request #136 from rhansen/init-script-cleanup 2020-05-29 03:23:57 +02:00
Richard Hansen
e7c43e9eef Improve robustness of daemon interval extraction
Without this change the init script incorrectly handles config file
lines like these:

    foo=bar # daemon=123
    foodaemon=123
    daemonfoo=123
    daemon=0
    DAEMON=123
2020-05-28 14:53:37 -04:00
Richard Hansen
cecbaba3e0 Whitespace and minor style fixes 2020-05-28 14:53:37 -04:00
Richard Hansen
7be4d58b90 Convert invocations of usage() to fatal()
The usage text is extremely long which causes the error message to
scroll off the top of the screen. Switch to fatal() to avoid this
problem.
2020-05-28 14:46:13 -04:00
Richard Hansen
ca7f0927fc Fix usage()
* The first argument to usage() was supposed to be the exit status,
    but that is not how usage() is invoked (except in the `-help`
    case). Change usage() to work with the existing invocations rather
    than fix the invocations.
  * Don't attempt to send an email when passed `-help`.
  * Include the usage error message in the emailed log.
2020-05-28 14:46:13 -04:00
Richard Hansen
3a6a2ac036 Log errors to STDERR 2020-05-28 14:46:13 -04:00
Richard Hansen
d70c3bf784 Delete do-nothing $opt{'syslog'} = 1; when daemonized
That line has no effect because of the `%opt = %saved_opt;` line a few
lines later.
2020-05-28 11:19:13 -04:00
Richard Hansen
d10601de11 Delete redundant $opt{'daemon'} processing
The stuff done in this deleted block is already done in `check_value`.
2020-05-28 11:19:13 -04:00
Sandro
f425cea2d1
Merge pull request #128 from rhansen/ddclientd
Improve default daemonization when run as ddclientd
2020-05-28 05:00:33 +02:00
Sandro
dc81105781
Merge pull request #126 from rhansen/quote-here-doc 2020-05-28 04:52:08 +02:00
Sandro
31993eeb3b
Merge pull request #132 from rhansen/delete-commented-code 2020-05-28 02:22:59 +02:00
Richard Hansen
fcdaf7c3da Delete commented-out code
If it still had value it wouldn't be commented out.
2020-05-27 12:59:50 -04:00
Richard Hansen
e27d6af755 Quote the here-doc delimiter
The quoting might not be required for Perl, but without it Emacs's
syntax highlighting gets very confused.
2020-05-26 22:04:02 -04:00
Richard Hansen
b78144f7d5 Improve default daemonization when run as ddclientd
The output of -help now shows that daemonization is enabled by default
when the command is named something that ends with 'd' (such as
ddclientd).
2020-05-26 21:43:50 -04:00
Sandro Jäckel
4f0226ef05
Fix formatting especially with code examples, apply linter suggestions 2020-05-27 03:27:03 +02:00
Sandro Jäckel
42c21391f3
Update install instructions
Closes #144
2020-05-27 03:18:18 +02:00
Sandro
b6b9878315
Merge pull request #120 from rhansen/whitespace-fixes 2020-05-27 02:32:58 +02:00
Sandro
ee3c90c85f
Merge branch 'master' into whitespace-fixes 2020-05-27 02:32:32 +02:00
Sandro
bc23fd809c
Merge pull request #104 from psiegl/duckdns 2020-05-27 02:29:55 +02:00
Sandro
448e5c22c9
Change password 2020-05-27 02:29:26 +02:00
Richard Hansen
280818b384 Whitespace fixes
* Convert tabs to spaces
  * Use consistent indentation
  * Use consistent vertical alignment
2020-05-26 15:16:51 -04:00
wimpunk
233f1919dd
Removing dnspark (#105)
Removing dnspark as the service doesn't exist anymore.
2020-05-26 20:53:37 +02:00
Sandro Jäckel
3d1ed60812
Merge remote-tracking branch 'rhansen/process_args' (#121) 2020-05-26 20:52:29 +02:00
Sandro Jäckel
ac45f98bcd
Merge remote-tracking branch 'rhansen/sig' (#117) 2020-05-26 20:52:08 +02:00
Sandro Jäckel
ba488414f1
Merge remote-tracking branch 'rhansen/shebang' (#116) 2020-05-26 20:50:43 +02:00
Richard Hansen
b1cc82f2fa Replace Perl -w flag with use warnings;
Also delete the useless 2nd shebang line and bump the required Perl
version.

Now the shebang line conforms with Debian policy 4.1.2 to 4.2.0. See:
https://www.debian.org/doc/debian-policy/upgrading-checklist.html#version-4-1-2

Perl v5.8.0 (released in 2002) was chosen because:
  * `use warnings` was added in Perl v5.6.0 (released 2000)
  * The `require` function itself changed in v5.8.0 to support the
    more readable non-numeric version literal syntax.
2020-05-26 12:10:14 -04:00
Richard Hansen
5211cb55c8 Clean up process_args
* Delete unused variable `%opts`
  * Ensure that `%opt` exists before it is referenced in `process_args`
  * Don't bother returning a copy of `%opt`
2020-05-25 22:43:55 -04:00
Richard Hansen
f47ea295d5 Gracefully exit if interrupted by SIGINT 2020-05-24 21:56:07 -04:00
Richard Hansen
fb67669902 Don't attempt to catch the uncatchable SIGKILL signal 2020-05-24 21:51:26 -04:00
jameskupke
7a9991966b
Updated Namecheap example (#115) 2020-05-10 23:13:08 +02:00
Greg Best
18cc3a99e9
Added support for cloudflare API tokens. (#102)
* Added support for cloudflare API tokens. Do not provide a login if using one. The token must have permissions for All zones - Zone:Read, DNS:Edit.

* Fixed the grammar in the comments.

Co-authored-by: Greg Best <greg@NinjaCatServer>
2020-04-06 20:46:50 +02:00
samwell61
45ae9913f9
Fixed cloudflare cache not updating properly (#98)
Don't use the key for the cache but use the domain.

Co-authored-by: Samuel Bailey <samuel@bingbong.tech>
2020-04-06 20:44:33 +02:00