]> git.meshlink.io Git - catta/commitdiff
New gentoo initscript using libdaemon features
authorSebastien Estienne <sebastien.estienne@gmail.com>
Thu, 30 Jun 2005 11:27:33 +0000 (11:27 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Thu, 30 Jun 2005 11:27:33 +0000 (11:27 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@155 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

initscript/Gentoo/avahi.in

index af265124a79a63e04e976861916df62ebdbae1eb..a37c9651eedf522451f6ad7a5d063938655bb0e2 100644 (file)
@@ -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 $?
 }