aboutsummaryrefslogtreecommitdiffstats
path: root/dns/ddns
diff options
context:
space:
mode:
authorculot <culot@FreeBSD.org>2013-07-01 20:53:39 +0800
committerculot <culot@FreeBSD.org>2013-07-01 20:53:39 +0800
commitfa4d3f0e7cb0e842dd2e5984deb2edc9aa87a61d (patch)
treee6772dc203964bdd72f88d105d00da65d8267690 /dns/ddns
parent1c2bc6f46e0dc5c1d5dce2fa56ec2a5c34ffe7f6 (diff)
downloadfreebsd-ports-gnome-fa4d3f0e7cb0e842dd2e5984deb2edc9aa87a61d.tar.gz
freebsd-ports-gnome-fa4d3f0e7cb0e842dd2e5984deb2edc9aa87a61d.tar.zst
freebsd-ports-gnome-fa4d3f0e7cb0e842dd2e5984deb2edc9aa87a61d.zip
ddns is a lightweight UDP-based dynamic DNS updater.
It consists of a client that regularly sends UDP packets and a server that updates a bind zone file or runs a command using the peer IPv4 address of recieved UDP packets. WWW: http://fossil.instinctive.eu/ddns/home PR: ports/179316 Submitted by: Natacha Porte <natbsd@instinctive.eu>
Diffstat (limited to 'dns/ddns')
-rw-r--r--dns/ddns/Makefile32
-rw-r--r--dns/ddns/distinfo2
-rw-r--r--dns/ddns/files/ddns_client.conf.sample9
-rw-r--r--dns/ddns/files/ddns_client.in29
-rw-r--r--dns/ddns/files/ddns_server.conf.sample22
-rw-r--r--dns/ddns/files/ddns_server.in29
-rw-r--r--dns/ddns/files/pkg-message.in41
-rw-r--r--dns/ddns/pkg-descr6
8 files changed, 170 insertions, 0 deletions
diff --git a/dns/ddns/Makefile b/dns/ddns/Makefile
new file mode 100644
index 000000000000..c0b6315b7141
--- /dev/null
+++ b/dns/ddns/Makefile
@@ -0,0 +1,32 @@
+# Created by: Natacha Porte <natbsd@instinctive.eu>
+# $FreeBSD$
+
+PORTNAME= ddns
+PORTVERSION= 1.0
+CATEGORIES= dns
+MASTER_SITES= http://instinctive.eu/code/
+
+MAINTAINER= natbsd@instinctive.eu
+COMMENT= Lightweight UDP-based dynamic DNS updater
+
+LICENSE= BSD
+
+MAKEFILE= BSDmakefile
+USE_BZIP2= yes
+
+USE_RC_SUBR= ddns_client ddns_server
+
+SUB_FILES= pkg-message
+PLIST_FILES= sbin/ddns-server sbin/ddns-client \
+ etc/ddns_client.conf.sample etc/ddns_server.conf.sample
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/ddns-client ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/ddns-server ${PREFIX}/sbin
+ ${INSTALL_DATA} ${FILESDIR}/ddns_client.conf.sample ${PREFIX}/etc
+ ${INSTALL_DATA} ${FILESDIR}/ddns_server.conf.sample ${PREFIX}/etc
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/dns/ddns/distinfo b/dns/ddns/distinfo
new file mode 100644
index 000000000000..7681583678eb
--- /dev/null
+++ b/dns/ddns/distinfo
@@ -0,0 +1,2 @@
+SHA256 (ddns-1.0.tar.bz2) = ea65c8f8c0169b5aff1c987000e309186e502e9c8aef6c2d8de1d8a75a593251
+SIZE (ddns-1.0.tar.bz2) = 29856
diff --git a/dns/ddns/files/ddns_client.conf.sample b/dns/ddns/files/ddns_client.conf.sample
new file mode 100644
index 000000000000..500e6e451025
--- /dev/null
+++ b/dns/ddns/files/ddns_client.conf.sample
@@ -0,0 +1,9 @@
+(server ns.example.com 24680)
+(interval 60)
+(name host-1)
+(resolv-interval 0)
+(resolv-retry 7)
+(key # 0123456789ABCDEF 0123456789ABCDEF
+ 0123456789ABCDEF 0123456789ABCDEF
+ 0123456789ABCDEF 0123456789ABCDEF
+ 0123456789ABCDEF 0123456789ABCDEF #))
diff --git a/dns/ddns/files/ddns_client.in b/dns/ddns/files/ddns_client.in
new file mode 100644
index 000000000000..aaa94b68d1a1
--- /dev/null
+++ b/dns/ddns/files/ddns_client.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: ddns_client
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable ddns_client:
+#
+# ddns_client_enable (bool): Set it to "YES" to enable ddns client
+# Default is "NO".
+# ddns_client_conf (path): Set full path to config file.
+# Default is "%%PREFIX%%/etc/ddns_client.conf".
+
+. /etc/rc.subr
+
+name=ddns_client
+rcvar=ddns_client_enable
+
+load_rc_config $name
+
+: ${ddns_client_enable:=NO}
+: ${ddns_client_conf="%%PREFIX%%/etc/ddns_client.conf"}
+
+command=%%PREFIX%%/sbin/ddns-client
+command_args="-d -c ${ddns_client_conf}"
+required_files=${ddns_client_conf}
+
+run_rc_command "$1"
diff --git a/dns/ddns/files/ddns_server.conf.sample b/dns/ddns/files/ddns_server.conf.sample
new file mode 100644
index 000000000000..d1e5478f4fbf
--- /dev/null
+++ b/dns/ddns/files/ddns_server.conf.sample
@@ -0,0 +1,22 @@
+(listen 24680)
+(defaults
+ (effector
+ (system "logger 'shell script for " (name) " switching to address " (addr) "'")
+ (zone /etc/namedb/master/example.com)
+ (kill HUP /var/run/named/pid))
+ (flags allow-unsafe)
+ (interval 70 10)
+ (timeout 900))
+(account
+ (name host-1)
+ (key # 0123456789ABCDEF 0123456789ABCDEF
+ 0123456789ABCDEF 0123456789ABCDEF
+ 0123456789ABCDEF 0123456789ABCDEF
+ 0123456789ABCDEF 0123456789ABCDEF #))
+(account
+ (name ntpless-host-2)
+ (key # FEDCBA9876543210 FEDCBA9876543210
+ FEDCBA9876543210 FEDCBA9876543210
+ FEDCBA9876543210 FEDCBA9876543210
+ FEDCBA9876543210 FEDCBA9876543210 #)
+ (interval 86400))
diff --git a/dns/ddns/files/ddns_server.in b/dns/ddns/files/ddns_server.in
new file mode 100644
index 000000000000..f292c53e55db
--- /dev/null
+++ b/dns/ddns/files/ddns_server.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: ddns_server
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable ddns_server:
+#
+# ddns_server_enable (bool): Set it to "YES" to enable ddns server
+# Default is "NO".
+# ddns_server_conf (path): Set full path to config file.
+# Default is "%%PREFIX%%/etc/ddns_server.conf".
+
+. /etc/rc.subr
+
+name=ddns_server
+rcvar=ddns_server_enable
+
+load_rc_config $name
+
+: ${ddns_server_enable:=NO}
+: ${ddns_server_conf="%%PREFIX%%/etc/ddns_server.conf"}
+
+command=%%PREFIX%%/sbin/ddns-server
+command_args="-d -c ${ddns_server_conf}"
+required_files=${ddns_server_conf}
+
+run_rc_command "$1"
diff --git a/dns/ddns/files/pkg-message.in b/dns/ddns/files/pkg-message.in
new file mode 100644
index 000000000000..b37319e3950a
--- /dev/null
+++ b/dns/ddns/files/pkg-message.in
@@ -0,0 +1,41 @@
+========================================================================
+ddns configuration files were installed in the following directory:
+
+ %%ETCDIR%%
+
+Before starting the server or the client you need to perform the
+following steps:
+
+1) Copy the appropriate sample configuration file as follows:
+
+ cp %%ETCDIR%%/ddns_server.conf.sample %%ETCDIR%%/ddns_server.conf
+
+ or
+
+ cp %%ETCDIR%%/ddns_client.conf.sample %%ETCDIR%%/ddns_client.conf
+
+2) Edit ddns's configuration file to suit your needs:
+
+ $EDITOR %%ETCDIR%%/ddns_server.conf
+
+ or
+
+ $EDITOR %%ETCDIR%%/ddns_client.conf
+
+3) Add the following line to your rc.conf:
+
+ ddns_server_enable="YES"
+
+ or
+
+ ddns_client_enable="YES"
+
+
+Then you can start a ddns daemon by issuing the following command:
+
+ %%PREFIX%%/etc/rc.d/ddns_server start
+
+ or
+
+ %%PREFIX%%/etc/rc.d/ddns_client start
+========================================================================
diff --git a/dns/ddns/pkg-descr b/dns/ddns/pkg-descr
new file mode 100644
index 000000000000..d6baeeb1cb14
--- /dev/null
+++ b/dns/ddns/pkg-descr
@@ -0,0 +1,6 @@
+ddns is a lightweight UDP-based dynamic DNS updater.
+It consists of a client that regularly sends UDP packets and a
+server that updates a bind zone file or runs a command using the
+peer IPv4 address of recieved UDP packets.
+
+WWW: http://fossil.instinctive.eu/ddns/home