summaryrefslogtreecommitdiff
path: root/net-dns/avahi/files/autoipd-openrc.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dns/avahi/files/autoipd-openrc.sh
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dns/avahi/files/autoipd-openrc.sh')
-rw-r--r--net-dns/avahi/files/autoipd-openrc.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/net-dns/avahi/files/autoipd-openrc.sh b/net-dns/avahi/files/autoipd-openrc.sh
new file mode 100644
index 000000000000..dec3aa0521c1
--- /dev/null
+++ b/net-dns/avahi/files/autoipd-openrc.sh
@@ -0,0 +1,32 @@
+# Copyright (C) 2004-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Sven Wegener (swegener@gentoo.org)
+
+_config_vars="$_config_vars autoipd"
+
+autoipd_depend() {
+ program /usr/sbin/avahi-autoipd
+ after interface
+}
+
+autoipd_start() {
+ _exists true || return 1
+
+ eval args=\$autoipd_${IFVAR}
+
+ ebegin "Starting avahi-autoipd"
+ /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
+ eend "${?}" || return 1
+
+ _show_address
+
+ return 0
+}
+
+autoipd_stop() {
+ /usr/sbin/avahi-autoipd --check --syslog "${IFACE}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/sbin/avahi-autoipd --kill --syslog "${IFACE}"
+ eend "${?}"
+}