From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] ddns: Add network trigger
Date: Thu, 13 Aug 2015 10:35:34 +0100 [thread overview]
Message-ID: <1439458534-7915-1-git-send-email-michael.tremer@ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]
The network trigger will automatically update DDNS records
when the system comes online.
Signed-off-by: Michael Tremer <michael.tremer(a)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
--
2.4.3
reply other threads:[~2015-08-13 9:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439458534-7915-1-git-send-email-michael.tremer@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox