avahi 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin avahi
  4. #
  5. # Description : Avahi Boot Script
  6. #
  7. # Authors : William Immendorf - will.immendorf@gmail.com
  8. # Bruce Dubbs - bdubbs@linuxfromscratch.org
  9. #
  10. # Version : LFS 7.2
  11. #
  12. ########################################################################
  13. ### BEGIN INIT INFO
  14. # Provides: avahi
  15. # Required-Start: $syslog $local_fs $network
  16. # Should-Start: $remote_fs
  17. # Required-Stop: $network
  18. # Should-Stop: $remote_fs
  19. # Default-Start: 3 4 5
  20. # Default-Stop: 0 1 2 6
  21. # Short-Description: Service discovery on a local network
  22. # Description: Service discovery on a local network
  23. # X-LFS-Provided-By: BLFS / LFS 7.2
  24. ### END INIT INFO
  25. . /lib/lsb/init-functions
  26. case "${1}" in
  27. start)
  28. log_info_msg "Starting the Avahi Daemon"
  29. /usr/sbin/avahi-daemon -D
  30. evaluate_retval
  31. log_info_msg "Starting the Avahi mDNS/DNS-SD Configuration Daemon"
  32. /usr/sbin/avahi-dnsconfd -D
  33. evaluate_retval
  34. ;;
  35. stop)
  36. log_info_msg "Stopping the Avahi mDNS/DNS-SD Configuration Daemon"
  37. /usr/sbin/avahi-dnsconfd -k
  38. evaluate_retval
  39. log_info_msg "Stopping the Avahi Daemon"
  40. /usr/sbin/avahi-daemon -k
  41. evaluate_retval
  42. ;;
  43. reload)
  44. log_info_msg "Reloading the Avahi mDNS/DNS-SD Configuration Daemon"
  45. /usr/sbin/avahi-dnsconfd -r
  46. evaluate_retval
  47. log_info_msg "Reloading the Avahi Daemon"
  48. /usr/sbin/avahi-daemon -r
  49. evaluate_retval
  50. ;;
  51. restart)
  52. ${0} stop
  53. sleep 1
  54. ${0} start
  55. ;;
  56. status)
  57. statusproc avahi-daemon
  58. statusproc avahi-dnsconfd
  59. ;;
  60. *)
  61. echo "Usage: ${0} {start|stop|reload|restart|status}"
  62. exit 1
  63. ;;
  64. esac
  65. # End /etc/init.d/avahi