diff --git a/man/rules/meson.build b/man/rules/meson.build index 299546df9a0..5cef06f2268 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -1338,6 +1338,7 @@ manpages = [ 'systemd-udevd-varlink.socket'], ''], ['systemd-update-done.service', '8', ['systemd-update-done'], ''], + ['systemd-update-helper', '8', [], ''], ['systemd-update-utmp.service', '8', ['systemd-update-utmp'], 'ENABLE_UTMP'], ['systemd-user-sessions.service', '8', ['systemd-user-sessions'], 'HAVE_PAM'], ['systemd-userdbd.service', '8', ['systemd-userdbd'], 'ENABLE_USERDB'], diff --git a/man/systemd-update-helper.xml b/man/systemd-update-helper.xml new file mode 100644 index 00000000000..5c29c13cab3 --- /dev/null +++ b/man/systemd-update-helper.xml @@ -0,0 +1,212 @@ + + + + + + + + systemd-update-helper + systemd + + + + systemd-update-helper + 8 + + + + systemd-update-helper + Enable, disable, stop, and restart units when packages are installed, upgraded, or removed + + + + + /usr/lib/systemd/systemd-update-helper + OPTIONS + COMMAND + UNIT + + + + + Description + + Package managers call systemd-update-helper from the scriptlets of packages + that contain unit files. The systemd RPM macros and file triggers call it. It has to run as root. + + By default, the commands operate on the system service manager and the system unit directories. + With , they operate on the global user unit configuration and on every running + user service manager, i.e. every active user@UID.service + unit. A user service manager that fails or does not finish the operation within 15 seconds is skipped + and does not affect the others. The timeout is set at build time with the + option. + + If the system was not booted with systemd, or the helper runs in a + chroot2 + environment, the commands only change unit files and skip all operations on service managers. Set + $SYSTEMD_OFFLINE= to override this detection, see + Known Environment Variables. + + A UNIT argument is either a unit name or the absolute path of a unit + file directly in /usr/lib/systemd/system/ or /etc/systemd/system/, + or in /usr/lib/systemd/user/ or /etc/systemd/user/ with + . The path does not have to exist. Template units passed to + remove-units, mark-restart-units, and + mark-reload-units apply to all active instances of the template. + + + + Commands + + + + UNIT… + + Enables or disables the units according to the preset policy, like + systemctl preset does. With , applies the user preset + policy to the global user unit configuration, like systemctl --global preset + does. + + + + + + UNIT… + + Disables the units and stops them. With , each running user + service manager also disables the units in the configuration of its user, where + systemctl --user enable creates its symlinks. + + + + + + UNIT… + UNIT… + + Marks the units to be restarted or reloaded by the next + enqueue-marked. See enqueue-marked in + systemctl1. + + + + + + + + Reloads the configuration of the service manager. With , + reloads every running user service manager. + + + + + + + + Restarts or reloads the units that are marked for it, and waits for the jobs to + finish. + + + + + + + + Runs daemon-reload, then enqueue-marked. + + + + + + + + Options + + + + + + Operates on the system service manager and the system unit directories. This is the + default. + + + + + + + + Operates on the global user unit configuration and on every running user service + manager. + + + + + + + + Reads the units from standard input, one unit name or unit file path per line, + instead of from the arguments. Lines that do not name a unit, or name a path outside of the unit + directories, are ignored. The RPM file triggers pass the unit files of removed packages this + way. + + + + + + + + Logs the changes and operations without performing them. + + + + + + + + + Only logs errors. + + + + + + + + + + + Exit status + + On success, 0 is returned, a non-zero failure code otherwise. A failure to preset a unit with + install-units makes the command fail. Failures to disable, stop, mark, restart, or + reload individual units, and failures of individual user service managers, are logged and do not change + the exit status. + + + + Examples + + + Disable and stop the units of a removed package + + # printf '%s\n' /usr/lib/systemd/system/sshd.service /usr/lib/systemd/system/sshd@.service | \ + /usr/lib/systemd/systemd-update-helper --stdin remove-units + + This disables sshd.service and sshd@.service, and stops + sshd.service and all active instances of sshd@.service. + + + + + See Also + + systemd1 + systemctl1 + systemd.preset5 + daemon7 + + + +