User Tools

Site Tools


ubuntu:systemd:conflicting_services

Ubuntu - SystemD - Conflicting Services

When two services should not run at the same time, you can use the Conflicts parameter.


Example

To stop a VPN running when using the Transmission service.

Edit the transmission-daemon.service.

sudo vi /lib/systemd/system/transmission-daemon.service

…add the following line in the [Unit] section:

Conflicts=vpn.service

NOTE: vpn.service could be a service that starts a VPN connection.

  • This means that if I start the transmission-daemon.service, vpnservice will be automatically shut down, and vice versa.

Reload systemd

Reload systemd for the changes to take effect.

sudo systemctl daemon-reload
ubuntu/systemd/conflicting_services.txt · Last modified: 2023/06/03 10:17 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki