Up to now we recommended to use TARGET.upholds/ symlinks to start units when an extension is loaded. However, this has some drawbacks. First, for services that should not be tried to be started all the time we have to resort to hiding them through a target that gets uphold and then uses regular .wants/ for the actual service. Second, we actually leak services on extension unload even if the unit has disappeared with the extension. Third, to affect a service through a drop-in or a config change from a confext/sysext and that service is already running, we need a way to restart/reload it instead of just starting it. Similar to EXTENSION_RELOAD_MANAGER=1, add a EXTENSION_RESTART_UNITS= and a EXTENSION_RELOAD_OR_RESTART_UNITS= setting to the extension-release metadata file, carrying a whitespace-separated list of units to restart/reload on merge/refresh/unmerge after the daemon reload. Also detect when the unit has vanished which is normally the case when the unit was part of the unmerged extension, and stop it explicitly to prevent it leaking. When the extension itself ships the binary it should use EXTENSION_RESTART_UNITS= to make sure the new binary is picked up. Since starting through this setting does not work when the extension is mounted from the initrd, extensions should still ship at least a .wants/ symlink to start at boot but can also continue to ship a .upholds/ symlink for backwards compatibility without any drawback and still benefit from the unit stopping triggered by the new setting. While there are cases where one could want to set EXTENSION_RESTART_UNITS= without requiring a daemon reload (e.g., an env var file change instead of a unit drop-in), we now do an implicit daemon reload when we have to restart units so that we know we work on the right state and we spare users remembering to set this setting in addition to prevent running into this issue.
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
