So I'd like to stop certain services that I do not need cause as much as I'd like to remove them completely from my system, they are a dependency of software I actually need and use. With that I'd like to begin with avahi-daemon and upon referring to OpenRC and other documentation that came along with the artix-linux I installed, I was able to see that avahi-daemon has no runlevel assigned and I cannot use the command specified by the documentation to stop the service cause it tells me that avahi-daemon has no runlevel assigned.
I want to know how to properly stop the service along with the reason as to why services, even without an assigned runlevel, is still ran at startup.
I am guessing that avahi-daemon is being started (Needed by) cupsd. Atleast that is the situation on my system. If you look at /etc/init.d/cupsd, you will see it as a depend-need:
depend() {
use net
need dbus avahi-daemon
before nfs
after logger
}
What I have done, and it works for my USB plugged in printer setup is to comment out the avahi-daemon need, making sure to keep the dbus need:
depend() {
use net
#DXR need dbus avahi-daemon
need dbus
before nfs
after logger
}
This will allow cupsd to run, but not start avahi. Not sure about printers connected other than by USB; I assume avahi is needed then. Please understand this is a change I did for my particular situation, its not an official Artix fix.
Hello sphericalumbra
first, check the running process and if it's service file is installed correctly:
andre@fuji:~$ ps -aef | grep avahi
avahi 1926 1 0 10:03 ? 00:00:00 avahi-daemon: running [fuji.local]
avahi 1927 1926 0 10:03 ? 00:00:00 avahi-daemon: chroot helper
then
andre@fuji:~$ sudo rc-status
Runlevel: default
rsyslog [ started ]
rsync [ started ]
dbus [ started ]
lightdm [ started ]
sysstat [ started ]
anacron [ started ]
avahi-daemon [ started ]
...
...
And check these threads:
https://forum.artixlinux.org/index.php/topic,402.0.html
/Read it through, the solution might be there already.
OpenRC in general:
https://forum.artixlinux.org/index.php/board,29.0.html
The reference of OpenRC:
https://github.com/OpenRC/openrc/blob/master/service-script-guide.md
I hope that helps
Greetings, andre
Sorry for the late reply folks! Been really busy these days and still busy getting things back to normal OTL
I'll try them out next week hopefully when I have less things on my checklist since currently I am not running artix and I only do so on my spare time for testing and preparing it to be deemed worthy of my full-time use
@dxrobertson Thanks for the juicy details! Thankfully I don't need printers nor avahi as I plan to use artix on a pure gaming/web setup so there are no worries
@andre Thanks for that and the references! I'll be sure to read up and learn more about the awesome OpenRC. Systemd is the plague afterall XD
Even better, then you can simply disable cups service alltogether:
rc-update delete cupsd default
Many thanks for that! I apologize for not getting back to you in a timely manner due to RL things OTL
Admitted I have not yet install Artix as I still need to sort plenty of stuff out before committing to it but for sure I will definitely commit to it knowing that this is simply the most elegant non-systemd distro out there.
Now I'm back to business and I must say those commands really helped me! It also helped me understand open-rc to some extent