summaryrefslogtreecommitdiff
path: root/nonsystemd/openrc-desktop/autoipd-openrc.sh
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2020-01-13 00:05:24 -0300
committerDavid P <megver83@parabola.nu>2020-01-13 00:05:24 -0300
commit9f3dc87f7a01ea8e0d047edeee6d84911a7378c1 (patch)
tree6c00fe1f50adac100818036a133d516fc28b14da /nonsystemd/openrc-desktop/autoipd-openrc.sh
parentc10693a7a3ac299e6ff1908205f958ea714ed333 (diff)
downloadabslibre-9f3dc87f7a01ea8e0d047edeee6d84911a7378c1.tar.gz
abslibre-9f3dc87f7a01ea8e0d047edeee6d84911a7378c1.tar.bz2
abslibre-9f3dc87f7a01ea8e0d047edeee6d84911a7378c1.zip
addpkg: nonsystemd/openrc-desktop 20200112-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/openrc-desktop/autoipd-openrc.sh')
-rw-r--r--nonsystemd/openrc-desktop/autoipd-openrc.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/nonsystemd/openrc-desktop/autoipd-openrc.sh b/nonsystemd/openrc-desktop/autoipd-openrc.sh
new file mode 100644
index 000000000..749085228
--- /dev/null
+++ b/nonsystemd/openrc-desktop/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/bin/avahi-autoipd
+ after interface
+}
+
+autoipd_start() {
+ _exists true || return 1
+
+ eval args=\$autoipd_${IFVAR}
+
+ ebegin "Starting avahi-autoipd"
+ /usr/bin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
+ eend "${?}" || return 1
+
+ _show_address
+
+ return 0
+}
+
+autoipd_stop() {
+ /usr/bin/avahi-autoipd --check --syslog "${IFACE}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/bin/avahi-autoipd --kill --syslog "${IFACE}"
+ eend "${?}"
+}