The network trigger will automatically update DDNS records when the system comes online.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- ddns/10-ddns | 5 +++++ ddns/ddns.nm | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 ddns/10-ddns
diff --git a/ddns/10-ddns b/ddns/10-ddns new file mode 100755 index 0000000..2ed3cc9 --- /dev/null +++ b/ddns/10-ddns @@ -0,0 +1,5 @@ +#!/bin/bash + +[ "${ACTION}" = "online" ] || exit 0 + +exec systemctl start ddns.service diff --git a/ddns/ddns.nm b/ddns/ddns.nm index 5386ce7..5c17119 100644 --- a/ddns/ddns.nm +++ b/ddns/ddns.nm @@ -5,7 +5,7 @@
name = ddns version = 008 -release = 1 +release = 2 arch = noarch
groups = System/Tools @@ -45,6 +45,10 @@ build install_cmds # Ship an empty configuration file. touch %{BUILDROOT}%{sysconfdir}/%{name}/ddns.conf + + mkdir -pv %{BUILDROOT}%{prefix}/lib/network/triggers + install -v -m 755 %{DIR_SOURCE}/10-ddns \ + %{BUILDROOT}%{prefix}/lib/network/triggers/10-ddns end end