summaryrefslogtreecommitdiffstats
path: root/initscript/freebsd/avahi-dnsconfd.sh.in
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2005-11-19 19:49:24 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2005-11-19 19:49:24 +0000
commit002299d20901eaea6c7492670b050e4893271acf (patch)
tree71283247c6f1f710631eee4001f7aba147342310 /initscript/freebsd/avahi-dnsconfd.sh.in
parent238c921e17a59c54f381e4fd862c3883c73c639a (diff)
* Added FreeBSD rc.d scripts with the permission of its authors.
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1017 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'initscript/freebsd/avahi-dnsconfd.sh.in')
-rw-r--r--initscript/freebsd/avahi-dnsconfd.sh.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/initscript/freebsd/avahi-dnsconfd.sh.in b/initscript/freebsd/avahi-dnsconfd.sh.in
new file mode 100644
index 0000000..ed01f06
--- /dev/null
+++ b/initscript/freebsd/avahi-dnsconfd.sh.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD: /repoman/r/pcvs/ports/net/avahi/files/avahi-dnsconfd.sh,v 1.4 2005/11/19 06:36:09 ahze Exp $
+#
+# PROVIDE: avahi_dnsconfd
+# REQUIRE: DAEMON dbus avahi_daemon
+# KEYWORD: FreeBSD
+#
+# avahi-dnsconfd connects to a running avahi-daemon and runs the script
+# @sysconfdir@/avahi/dnsconf.action for each unicast DNS server that
+# is announced on the local LAN. This is useful for configuring unicast
+# DNS servers in a DHCP-like fashion with mDNS.
+#
+
+avahi_dnsconfd_enable=${avahi_dnsconfd_enable-"NO"}
+avahi_dnsconfd_flags=${avahi_dnsconfd_flags-"-D"}
+
+. /etc/rc.subr
+
+name=avahi_dnsconfd
+rcvar=`set_rcvar`
+
+start_cmd=avahi_dnsconfd_start
+stop_cmd=avahi_dnsconfd_stop
+
+avahi_dnsconfd_bin=@sbindir@/avahi-dnsconfd
+
+avahi_dnsconfd_start() {
+ checkyesno avahi_dnsconfd_enable && echo "Starting avahi-dnsconfd." && \
+ ${avahi_dnsconfd_bin} ${avahi_dnsconfd_flags}
+}
+
+avahi_dnsconfd_stop() {
+ checkyesno avahi_dnsconfd_enable && echo "Stopping avahi-dnsconfd." && \
+ ${avahi_dnsconfd_bin} -k
+}
+
+load_rc_config ${name}
+run_rc_command "$1"