Home | History | Annotate | Download | only in suse
      1 #! /bin/sh
      2 ### BEGIN INIT INFO
      3 # Provides:          avahi-dnsconfd
      4 # Required-Start:    $remote_fs avahi
      5 # Required-Stop:     $remote_fs avahi
      6 # Default-Start:     3 5
      7 # Default-Stop:
      8 # Short-Description: ZeroConf daemon
      9 # Description:       Avahi, a ZeroConf daemon for mDNS and service registration
     10 ### END INIT INFO
     11 
     12 AVAHI_BIN=@sbindir@/avahi-dnsconfd
     13 test -x $AVAHI_BIN || exit 5
     14 
     15 . /etc/rc.status
     16 rc_reset
     17 
     18 case "$1" in
     19 	start)
     20 		echo -n "Starting Avahi DNS Configuration daemon "
     21 		$AVAHI_BIN -D
     22 		rc_status -v
     23 		;;
     24 	stop)
     25 		echo -n "Shutting down Avahi DNS Configuration daemon "
     26 		$AVAHI_BIN -k 2>/dev/null || /bin/true
     27 		rc_status -v
     28 		;;
     29 	restart)
     30 		$0 stop
     31 		$0 start
     32 		rc_status
     33 		;;
     34 	try-restart|condrestart)
     35 		if test "$1" = "condrestart"; then
     36 			echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
     37 		fi
     38 		$0 status
     39 		if test $? = 0; then
     40 			$0 restart
     41 		else
     42 			rc_reset
     43 		fi
     44 		rc_status
     45 		;;
     46 	force-reload|reload)
     47 		echo -n "Reloading Avahi DNS Configuration daemon "
     48 		$AVAHI_BIN -r
     49 		rc_status -v
     50 		;;
     51 	status)
     52 		echo -n "Checking for Avahi DNS Configuration daemon: "
     53 		$AVAHI_BIN -c || _rc_status=3
     54 		rc_status -v
     55 		;;
     56 	*)
     57 		echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
     58 		exit 1
     59 		;;
     60 esac
     61