How to deactivate unneeded services?

I use patchbox OS to run MODEP. I only need MODEP and it’s dependencies. No Bluetooth, no pisound, no touchosc etc.

For some reason, disabling the services with systemctl disable doesn’t work. It looks like some of your super fancy scripts stuff is the cause. My current solution is removing the units all together. And this doesn’t even work for Bluetooth. And now your scripts spam the system log.

Is there a better solution? Why do you even use this custom stuff instead of relying on systemd?

Ok I figured out that the “dependencies” of MODEP are defined in /usr/local/patchbox-modules/modep/patchbox-module.json. Why are you doing it that way? Systemd can manage all dependencies for you and if you define it with Wants= or WantedBy=, it doesn’t crash horribly just because an optional service couldn’t start. Sorry for my tone… this annoyed the shit out of me for two hours.

I’ve just published patchbox utility version 1.1.5, it allows service files to be ‘masked’ and not started. Here’s how to do it:

patchbox update # First get the update.

sudo systemctl stop modep-touchosc2midi
sudo systemctl mask modep-touchosc2midi
patchbox module deactivate
patchbox module activate modep

Having the utility to build on systemd services allows us to easily hook up some services with their configs dedicated for the module, and it’s easy to switch between the modules when the module is described in a single json file.


Ok this looks good. Gonna try this later tonight. Thanks for the fast response and sorry for my harsh tone.