]> git.meshlink.io Git - catta/commitdiff
- updated Debian initscript to use libdeamon features (-k/-D/-r).
authorSebastien Estienne <sebastien.estienne@gmail.com>
Tue, 21 Jun 2005 10:31:28 +0000 (10:31 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Tue, 21 Jun 2005 10:31:28 +0000 (10:31 +0000)
- fix a duplicate detection of dbus api version.

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@134 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

configure.ac
initscript/Debian/15avahi.in

index 5d0cc76d94e93aa89855c94babfed31d7a27ba24..59a50ce76ca1242bebb3d5a3bc53eb8ac54f7829 100644 (file)
@@ -140,10 +140,6 @@ if test "x$ENABLE_DBUS" = "xyes"; then
 
         AC_SUBST(DBUS_CFLAGS)
        AC_SUBST(DBUS_LIBS)
-
-       if pkg-config dbus-1 --atleast-version=0.30 ; then
-               AC_DEFINE(DBUS_USE_NEW_API, 1, [Whether to use the new API for DBUS 0.30])
-       fi
 fi
 
 AM_CONDITIONAL(ENABLE_DBUS, test "x$ENABLE_DBUS" = "xyes")
index 73a0c73cf9a4a349ed8733e1e4a5a84c968640da..6116078dad6f9cc2c85253104ef304deaf1be277 100755 (executable)
@@ -8,18 +8,12 @@
 
 . /lib/lsb/init-functions
 
-set -e
+#set -e
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DESC="Avahi ZeroConf daemon"
 NAME="avahi"
 DAEMON=/usr/bin/$NAME
-PIDDIR=/var/run/$NAME
-PIDFILE=$PIDDIR/$NAME.pid
-DAEMONUSER=@AVAHI_USER@
-DAEMONGRP=@AVAHI_GROUP@
-
-
 
 # Gracefully exit if the package has been removed.
 test -x $DAEMON || exit 0
@@ -28,40 +22,41 @@ test -x $DAEMON || exit 0
 #       Function that starts the daemon/service.
 #
 d_start() {
-  if [ ! -d $PIDDIR ]; then
-    mkdir -p $PIDDIR
-  fi
-  chown -R $DAEMONUSER:$DAEMONGRP $PIDDIR
-
-        start-stop-daemon --start \
-           --background --chuid $DAEMONUSER \
-           -m --pidfile $PIDFILE \
-            --exec $DAEMON -- $DAEMON_OPTS
-
+    $DAEMON -D
 }
 
 #
 #       Function that stops the daemon/service.
 #
 d_stop() {
-        start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
-                --exec $DAEMON
+    $DAEMON -k || /bin/true
+}
 
+#
+#       Function that reload the config file for the daemon/service.
+#
+d_reload() {
+    $DAEMON -r
 }
 
 
 case "$1" in
-  start)
+    start)
         log_begin_msg "Starting $DESC: $NAME"
         d_start
         log_end_msg $?
         ;;
-  stop)
+    stop)
         log_begin_msg "Stopping $DESC: $NAME"
         d_stop
         log_end_msg $?
         ;;
-  restart|force-reload)
+    reload)
+        log_begin_msg "Reloading config file for $DESC: $NAME"
+       d_reload
+        log_end_msg $?
+        ;;
+    restart|force-reload)
         log_begin_msg "Restarting $DESC: $NAME"
         d_stop
         sleep 1
@@ -69,7 +64,7 @@ case "$1" in
         log_end_msg $?
         ;;
   *)
-        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload}" >&2
         exit 1
         ;;
 esac