summaryrefslogtreecommitdiffstats
path: root/initscript
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2005-06-30 11:27:33 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2005-06-30 11:27:33 +0000
commitd1a132e5b28680602a64f5d6f9fcfa4072f75cc4 (patch)
tree0957a535e99f044c9a090da20b8c6b5aa2e6a284 /initscript
parent3a1fef3f4a83e7f2d8bcff2f692ff07053001f6d (diff)
New gentoo initscript using libdaemon features
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@155 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'initscript')
-rw-r--r--initscript/Gentoo/avahi.in26
1 files changed, 17 insertions, 9 deletions
diff --git a/initscript/Gentoo/avahi.in b/initscript/Gentoo/avahi.in
index af26512..a37c965 100644
--- a/initscript/Gentoo/avahi.in
+++ b/initscript/Gentoo/avahi.in
@@ -1,20 +1,28 @@
+#!/sbin/runscript
+# Avahi ZeroConf Daemon init script
+# Many thanks to the Avahi developer's and Sebastien Estienne
+
DAEMON=/usr/bin/avahi
+depend () {
+ need dbus
+}
+
start() {
- ebegin "Starting avahi"
- start-stop-daemon --start --quiet --exec $DAEMON
- eend $?
+ ebegin "Starting avahi"
+ $DAEMON -D
+ eend $?
}
stop() {
- ebegin "Stopping avahi"
- start-stop-daemon --stop --quiet --exec $DAEMON
- eend $?
+ ebegin "Stopping avahi"
+ $DAEMON -k || /bin/true
+ eend $?
}
reload() {
- ebegin "Reloading avahi configuration"
- start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
- eend $?
+ ebegin "Reloading avahi configuration"
+ $DAEMON -r
+ eend $?
}