Enable Avahi/Zeroconf Programmatically

  • I have a Kodi addon that depends on the Avahi service. Previously I've had users manually enable it via the menus inside Kodi (Kodi/Add-ons/LibreELEC Configuration/Services/Enable Avahi). Is there any way to do this in a programmatic fashion? I know I could just call "systemctl enable avahi-daemon.service" but I'm not sure if that status will be reflected in the Kodi menus (the Enable/Disable button) if the user were to revisit the menu in the future.

  • Currently it is:

    Code
    rm -f /storage/.cache/services/avahi.conf.disabled
    touch /storage/.cache/services/avahi.conf
    systemctl restart avahi-daemon.service

    But this can theoretically change any time.

  • Currently it is:

    Code
    rm -f /storage/.cache/services/avahi.conf.disabled
    touch /storage/.cache/services/avahi.conf
    systemctl restart avahi-daemon.service

    But this can theoretically change any time.

    Thanks that should do the trick for my purposes.