WebThingsIO / gateway-docker

Legacy docker image for WebThings Gateway - now moved to main gateway repo at https://github.com/WebThingsIO/gateway
Mozilla Public License 2.0
72 stars 25 forks source link

Don't pass -D to avahi-daemon #30

Closed snorp closed 4 years ago

snorp commented 4 years ago

Fixes #29

mrstegeman commented 4 years ago

Unless I'm wrong, I believe avahi-daemon will just keep restarting repeatedly in the background because of the runit service.

snorp commented 4 years ago

I think it's trying to restart it constantly right now because of the daemonization. The log spam is from avahi-daemon detecting that it's already running and bailing out.

mrstegeman commented 4 years ago

runit automatically restarts any services in /etc/service, as this one is.

https://stackoverflow.com/a/30063607

snorp commented 4 years ago

runit automatically restarts any services in /etc/service, as this one is.

https://stackoverflow.com/a/30063607

Right. If you pass -D to avahi-daemon, it forks and the initial process exits. This means our run script exits, and runit thinks it needs to try to restart the service. In our case, avahi-daemon is still running, and it detects this, generating the log spam.

mrstegeman commented 4 years ago

@snorp I see now. I was thinking avahi was crashing.

white-gecko commented 4 years ago

Ah cool, I didn't think about that when I added it. Thank you.