Merge branch 'master' of https://github.com/ddclient/ddclient into Initial-set-of-IPv6-settings

This commit is contained in:
David Kerr 2020-07-03 14:37:18 -04:00
commit a1a078ba89
6 changed files with 143 additions and 11 deletions

View file

@ -9,17 +9,28 @@ on:
- master
jobs:
test-ubuntu:
test-debian-like:
strategy:
matrix:
ubuntu:
- 16.04
- latest
runs-on: ubuntu-${{ matrix.ubuntu }}
image:
- ubuntu:latest
- ubuntu:16.04
- debian:testing
- debian:stable
- debian:oldstable
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
steps:
- name: install dependencies
run: |
apt-get update &&
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
automake \
libtest-warnings-perl \
make \
;
- uses: actions/checkout@v2
- name: install test dependencies
run: sudo apt-get install libtest-warnings-perl
- name: autogen
run: ./autogen
- name: configure
@ -67,7 +78,25 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: dnf install -y perl-version automake make perl-Test-Warnings
run: dnf install -y automake findutils make perl-Test-Warnings perl-version
- name: autogen
run: ./autogen
- name: configure
run: ./configure
- name: check
run: make VERBOSE=1 check
- name: distcheck
run: make VERBOSE=1 distcheck
test-redhat:
runs-on: ubuntu-latest
# we use redhats univeral base image which is not available on docker hub
# https://catalog.redhat.com/software/containers/ubi7/ubi/5c3592dcd70cc534b3a37814
container: registry.access.redhat.com/ubi7/ubi
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: yum install -y perl-version automake make perl-Test-Simple
- name: autogen
run: ./autogen
- name: configure

View file

@ -7,6 +7,52 @@ possible.
To contribute changes, please open a pull request against the
[ddclient GitHub project](https://github.com/ddclient/ddclient/pulls).
## Developer Certificate of Origin
All contributions are subject to the [Developer Certificate of Origin
v1.1](https://developercertificate.org/), copied below. A
`Signed-off-by` line in each commit message is **not** required.
```
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```
## Style
* Above all else, try to match the existing style surrounding your

View file

@ -15,6 +15,7 @@ EXTRA_DIST = \
sample-etc_dhclient-exit-hooks \
sample-etc_dhcpc_dhcpcd-eth0.exe \
sample-etc_ppp_ip-up.local \
sample-etc_rc.d_ddclient.freebsd \
sample-etc_rc.d_init.d_ddclient \
sample-etc_rc.d_init.d_ddclient.alpine \
sample-etc_rc.d_init.d_ddclient.lsb \

View file

@ -141,7 +141,7 @@ make sure you have perl and the required modules installed
if you plan to use cloudflare or feedns you need the perl json module
apt-get install libjson-any-perl
apt-get install libjson-pp-perl
for IPv6 you also need to instal the perl io-socker-inet6 module
@ -151,6 +151,28 @@ start the first time by hand
service ddclient start
### FreeBSD style rc files and daemon mode
mkdir -p /usr/local/etc/rc.d
cp sample-etc_rc.d_ddclient.freebsd /usr/local/etc/rc.d/ddclient
enable automatic startup when booting
sysrc ddclient_enable=YES
make sure you have perl and the required modules installed
pkg install perl5 p5-Data-Validate-IP p5-IO-Socket-SSL
if you plan to use cloudflare or feedns you need the perl json module
pkg install p5-JSON-PP
start the service manually for the first time
service ddclient start
If you are not using daemon-mode, configure cron and dhcp or ppp as described below.
-------------------------------------------------------------------------------

View file

@ -21,9 +21,12 @@ AX_PROG_PERL_VERSION([5.10.1], [],
[AC_MSG_ERROR([Perl 5.10.1 or newer not found])])
AC_SUBST([PERL])
# Perl modules required to run ddclient. Core modules may be omitted;
# they are assumed to always exist.
# Perl modules required to run ddclient. Note: CentOS, RHEL, and
# Fedora put some core modules in separate packages, and the perl
# package doesn't depend on all of them, so their availability can't
# be assumed.
m4_foreach_w([_m], [
version=0.77
], [AX_PROG_PERL_MODULES([_m], [],
[AC_MSG_ERROR([missing required Perl module _m])])])

View file

@ -0,0 +1,31 @@
#!/bin/sh
# PROVIDE: ddclient
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# ddclient_enable (bool): Set to NO by default.
# Set it to YES to enable ddclient.
. /etc/rc.subr
name=ddclient
rcvar=ddclient_enable
ddclient_conf="/etc/ddclient/ddclient.conf"
command="/usr/local/sbin/${name}"
load_rc_config $name
delay=$(grep -v '^\s*#' "${ddclient_conf}" | grep -i -m 1 "daemon" | awk -F '=' '{print $2}')
if [ -z "${delay}" ]
then
ddclient_flags="-daemon 300"
else
ddclient_flags=""
fi
run_rc_command "$1"