]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
scheduler: add a systemd slice 1035/head
authorTomodachi94 <tomodachi94@protonmail.com>
Sat, 24 Aug 2024 19:23:51 +0000 (12:23 -0700)
committerTomodachi94 <tomodachi94@protonmail.com>
Tue, 27 Aug 2024 20:39:11 +0000 (13:39 -0700)
From the systemd documentation[1]:

> A slice unit is a concept for hierarchically managing resources of a group of processes.

Benefits of collecting our two systemd services into a slice include
* ease of configuring resource limits on the entire CUPS system,
* ``systemctl status`` showing the CUPS units in an indented subtree,
  making it more organized,
* and the possibility of viewing all interlaced logs from all of the CUPS
  daemons using ``journalctl -u system-cups.slice``.

[1]:
https://www.freedesktop.org/software/systemd/man/latest/systemd.slice.html
or ``man systemd.slice(5)``

CHANGES.md
scheduler/Makefile
scheduler/cups-lpdAT.service.in
scheduler/cups.service.in
scheduler/system-cups.slice [new file with mode: 0644]

index 4c9f23767f21389d87204d85b1e4ed1d4e4c37bd..a5a77373fa81b52bafeae40e81d36e1a223d5173 100644 (file)
@@ -22,6 +22,7 @@ Changes in CUPS v2.5b1 (TBA)
 - Added driver filter to web interface (Issue #848)
 - Added support for PAM modules password-auth and system-auth (Issue #892)
 - Added Docker support (Issue #929)
+- Added a systemd slice to the systemd services included with the scheduler
 - Added localizations for deprecated IPP attributes/options (Issue #1020)
 - Updated CUPS to require TLS support - OpenSSL, GNUTLS and LibreSSL are
   supported.
index 9d6f3a02b3b7502389fd250846e963589f923dac..0ec0585837d62ce50ee7dad9538a64e3c558213a 100644 (file)
@@ -195,6 +195,7 @@ install-data:
        if test "x$(SYSTEMD_DIR)" != x; then \
                echo Installing systemd configuration files...; \
                $(INSTALL_DIR) $(BUILDROOT)$(SYSTEMD_DIR); \
+               $(INSTALL_DATA) system-cups.slice $(BUILDROOT)$(SYSTEMD_DIR); \
                $(INSTALL_DATA) cups.path $(BUILDROOT)$(SYSTEMD_DIR); \
                $(INSTALL_DATA) cups.service $(BUILDROOT)$(SYSTEMD_DIR); \
                $(INSTALL_DATA) cups.socket $(BUILDROOT)$(SYSTEMD_DIR); \
index 5c7827340b54d366bbd3f397024dda2de9a95688..88cbfcf1a7352efa9bd539e28ad3f1c962b2ef01 100644 (file)
@@ -6,4 +6,5 @@ Documentation=man:cups-lpd(8)
 ExecStart=-@CUPS_SERVERBIN@/daemon/cups-lpd
 StandardInput=socket
 User=@CUPS_USER@
+Slice=system-cups.slice
 
index 7a6831b31cc4607c548a4ea1597b25ee148359e8..72ca3f4d7e3e2ad00bb6efd6f57e4223416c1ec0 100644 (file)
@@ -8,6 +8,7 @@ Requires=cups.socket
 ExecStart=@sbindir@/cupsd -l
 Type=notify
 Restart=on-failure
+Slice=system-cups.slice
 @TIMEOUTSTARTSEC@
 
 [Install]
diff --git a/scheduler/system-cups.slice b/scheduler/system-cups.slice
new file mode 100644 (file)
index 0000000..53ef2fa
--- /dev/null
@@ -0,0 +1,3 @@
+[Unit]
+Description=CUPS Slice
+Documentation=man:cups(1)