avahi-daemon.postinst 522 B

1234567891011121314151617181920212223242526
  1. if [ -z "$D" ]; then
  2. killall -q -HUP dbus-daemon || true
  3. fi
  4. OPTS=""
  5. if [ -n "$D" ]; then
  6. OPTS="--root=$D"
  7. fi
  8. if type systemctl >/dev/null 2>/dev/null; then
  9. systemctl $OPTS enable avahi-daemon.service
  10. if [ -z "$D" -a "enable" = "enable" ]; then
  11. systemctl --no-block restart avahi-daemon.service
  12. fi
  13. fi
  14. # Begin section update-rc.d
  15. if type update-rc.d >/dev/null 2>/dev/null; then
  16. if [ -n "$D" ]; then
  17. OPT="-r $D"
  18. else
  19. OPT="-s"
  20. fi
  21. update-rc.d $OPT avahi-daemon defaults 21 19
  22. fi
  23. # End section update-rc.d