Generally you would just the Avahi API to advertise your service instead of dynamically updating the “static” service files (which is what they are generally designed for - unchanging manual services).
Is there something that prevents you from doing that? Or a reason you haven’t before now? You could also as a “hack” just launch an instance of the avahi-publish-service CLI tool. Trent > On 3 Apr 2020, at 3:46 pm, Russell Senior <russ...@personaltelco.net> wrote: > > > I have an application hosted on an OpenWrt version of avahi. In the land of > OpenWrt, storage space is often on NOR flash, which is both scarce and > limited in the number write cycles it can support. OpenWrt generally goes to > considerable lengths to avoid often written files landing on flash, instead > directing them to a tmpfs volatile filesystem. > > In my application, the service changes the advertised port number of over > restart, and so the service file is different on every restart. I have a > local hack that modifies avahi's Makefile.am to change the location of the > service directory to the tmpfs. This is discussed briefly (see also my patch > there) in this OpenWrt github issue: > https://github.com/openwrt/packages/issues/11733 > > I was encouraged to inquire here whether some suitable solution is acceptable > in mainline avahi to allow runtime selection of servicedir so that we can use > mainline avahi in OpenWrt without my hack. > > Thanks! > > -- > Russell Senior > russ...@personaltelco.net > _______________________________________________ > avahi mailing list > avahi@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/avahi
_______________________________________________ avahi mailing list avahi@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/avahi