|
Zdenek Dohnal |
cd3910 |
diff -up cups-2.2.5/scheduler/main.c.systemd-socket cups-2.2.5/scheduler/main.c
|
|
Zdenek Dohnal |
cd3910 |
--- cups-2.2.5/scheduler/main.c.systemd-socket 2017-10-17 18:59:53.732431498 +0200
|
|
Zdenek Dohnal |
cd3910 |
+++ cups-2.2.5/scheduler/main.c 2017-10-17 19:02:13.132275861 +0200
|
|
Zdenek Dohnal |
cd3910 |
@@ -691,8 +691,16 @@ main(int argc, /* I - Number of comm
|
|
Tim Waugh |
e946d3 |
|
|
Zdenek Dohnal |
cd3910 |
#ifdef HAVE_ONDEMAND
|
|
Tim Waugh |
e946d3 |
if (OnDemand)
|
|
Tim Waugh |
e946d3 |
+ {
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
|
Tim Waugh |
e946d3 |
- else
|
|
Tim Waugh |
e946d3 |
+# ifdef HAVE_SYSTEMD
|
|
Tim Waugh |
e946d3 |
+ sd_notifyf(0, "READY=1\n"
|
|
Tim Waugh |
e946d3 |
+ "STATUS=Scheduler is running...\n"
|
|
Tim Waugh |
e946d3 |
+ "MAINPID=%lu",
|
|
Tim Waugh |
e946d3 |
+ (unsigned long) getpid());
|
|
Tim Waugh |
e946d3 |
+# endif /* HAVE_SYSTEMD */
|
|
Tim Waugh |
e946d3 |
+ } else
|
|
Zdenek Dohnal |
cd3910 |
+
|
|
Zdenek Dohnal |
5d1499 |
#endif /* HAVE_ONDEMAND */
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
52c42a |
if (fg)
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
|
Zdenek Dohnal |
cd3910 |
diff -up cups-2.2.5/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.5/scheduler/org.cups.cupsd.path.in
|
|
Zdenek Dohnal |
cd3910 |
--- cups-2.2.5/scheduler/org.cups.cupsd.path.in.systemd-socket 2017-10-13 20:22:26.000000000 +0200
|
|
Zdenek Dohnal |
cd3910 |
+++ cups-2.2.5/scheduler/org.cups.cupsd.path.in 2017-10-17 18:59:53.732431498 +0200
|
|
Zdenek Dohnal |
a5a6be |
@@ -3,7 +3,7 @@ Description=CUPS Scheduler
|
|
Zdenek Dohnal |
a5a6be |
PartOf=org.cups.cupsd.service
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
[Path]
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
|
Tim Waugh |
9829b0 |
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
[Install]
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
WantedBy=multi-user.target
|
|
Zdenek Dohnal |
cd3910 |
diff -up cups-2.2.5/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.5/scheduler/org.cups.cupsd.service.in
|
|
Zdenek Dohnal |
cd3910 |
--- cups-2.2.5/scheduler/org.cups.cupsd.service.in.systemd-socket 2017-10-13 20:22:26.000000000 +0200
|
|
Zdenek Dohnal |
cd3910 |
+++ cups-2.2.5/scheduler/org.cups.cupsd.service.in 2017-10-17 18:59:53.732431498 +0200
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
fce8f5 |
@@ -1,10 +1,11 @@
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
fce8f5 |
[Unit]
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
Description=CUPS Scheduler
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
fce8f5 |
Documentation=man:cupsd(8)
|
|
Tim Waugh |
6865fd |
+After=network.target
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
[Service]
|
|
Tim Waugh |
e946d3 |
ExecStart=@sbindir@/cupsd -l
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
-Type=simple
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
+Type=notify
|
|
Tim Waugh |
9829b0 |
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
[Install]
|
|
![](https://seccdn.libravatar.org/avatar/7eafec293cdc84ccc79910e3192915e78e6e34e812c9116c61cc64bf13dc271a?s=16&d=retro) |
6dd074 |
Also=org.cups.cupsd.socket org.cups.cupsd.path
|