LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How to disable certain services (e.g. avahi-daemon) under systemd? (https://www.linuxquestions.org/questions/debian-26/how-to-disable-certain-services-e-g-avahi-daemon-under-systemd-4175552439/)

wirawan0 09-02-2015 11:46 AM

How to disable certain services (e.g. avahi-daemon) under systemd?
 
In Debian 8 which uses systemd, the avahi service is enabled by default. It flooded my syslog with usesless messages like

Code:

Aug 21 10:42:54 wirawan2 avahi-daemon[1474]: Invalid response packet from host xxx.xxx.xxx.xxx.
Aug 21 10:42:54 wirawan2 avahi-daemon[1474]: Invalid response packet from host xxx.xxx.xxx.xxx.
Aug 21 10:42:55 wirawan2 avahi-daemon[1474]: Invalid response packet from host xxx.xxx.xxx.xxx.
Aug 21 10:42:55 wirawan2 avahi-daemon[1474]: Invalid response packet from host xxx.xxx.xxx.xxx.
Aug 21 10:42:55 wirawan2 avahi-daemon[1474]: Invalid response packet from host xxx.xxx.xxx.xxx.

Tons of them! Out of the 16 syslog samples I have, it contains over 606000 lines of that! Yikes!

Frankly I do not like avahi daemon and don't care to have it running on my system. In particular, this software sniffs everyone on the network.

So here is my question: How to disable avahi daemon for good in systemd-based system and prevent its name being called by anyone (so to speak). I tried several commands:

Code:

systemd stop avahi-daemon
systemd disable avahi-daemon

but these do not persist across reboot, and in particular it can still be activated somehow. I found another way, which is to mask the service:

Code:

systemd mask avahi-daemon
Once I masked avahi-daemon, my syslog is still filled with this error--much less frequency but still annoying:

Code:

Sep  2 11:57:33 wirawan2 dbus[1486]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
Sep  2 11:57:33 wirawan2 dbus[1486]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory.

What is actually the proper way to remove avahi daemon from operating? dbus is still trying to call for avahi daemon.

Wirawan

wroom 09-03-2015 04:11 AM

Have you tried to simply uninstall the avahi-daemon?

I works for me.

rtmistler 09-04-2015 07:48 AM

In directory: /etc/systemd/system/multi-user.target.wants there will be a symbolic link for the service to enable avahi. Just remove that link.

onebuck 09-06-2015 11:39 AM

Moderator response
 
Moved: This thread is more suitable in <Debian> and has been moved accordingly to help your thread/question get the exposure it deserves.

273 09-06-2015 11:46 AM

Quote:

Originally Posted by wroom (Post 5415156)
Have you tried to simply uninstall the avahi-daemon?

I works for me.

I do this also with no ill effects.


All times are GMT -5. The time now is 10:21 PM.