2017-01-19 11:02:44 +00:00
|
|
|
diff -up cups-2.2.2/scheduler/main.c.systemd-socket cups-2.2.2/scheduler/main.c
|
|
|
|
--- cups-2.2.2/scheduler/main.c.systemd-socket 2017-01-19 11:12:42.004520240 +0100
|
|
|
|
+++ cups-2.2.2/scheduler/main.c 2017-01-19 11:12:42.029520021 +0100
|
2016-06-27 16:29:55 +00:00
|
|
|
@@ -690,8 +690,15 @@ main(int argc, /* I - Number of comm
|
2015-01-27 11:06:16 +00:00
|
|
|
|
2016-06-27 16:29:55 +00:00
|
|
|
#if defined(HAVE_ONDEMAND)
|
2015-01-27 11:06:16 +00:00
|
|
|
if (OnDemand)
|
|
|
|
+ {
|
2014-09-12 16:19:24 +00:00
|
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
2015-01-27 11:06:16 +00:00
|
|
|
- else
|
|
|
|
+# ifdef HAVE_SYSTEMD
|
|
|
|
+ sd_notifyf(0, "READY=1\n"
|
|
|
|
+ "STATUS=Scheduler is running...\n"
|
|
|
|
+ "MAINPID=%lu",
|
|
|
|
+ (unsigned long) getpid());
|
|
|
|
+# endif /* HAVE_SYSTEMD */
|
|
|
|
+ } else
|
2016-06-27 16:29:55 +00:00
|
|
|
#endif /* HAVE_ONDEMAND */
|
2014-04-17 14:59:54 +00:00
|
|
|
if (fg)
|
2014-09-12 16:19:24 +00:00
|
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
2017-01-19 11:02:44 +00:00
|
|
|
diff -up cups-2.2.2/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.2/scheduler/org.cups.cupsd.path.in
|
|
|
|
--- cups-2.2.2/scheduler/org.cups.cupsd.path.in.systemd-socket 2017-01-19 11:12:42.029520021 +0100
|
|
|
|
+++ cups-2.2.2/scheduler/org.cups.cupsd.path.in 2017-01-19 11:19:34.468933097 +0100
|
|
|
|
@@ -3,7 +3,7 @@ Description=CUPS Scheduler
|
|
|
|
PartOf=org.cups.cupsd.service
|
2014-09-12 16:19:24 +00:00
|
|
|
|
|
|
|
[Path]
|
|
|
|
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
|
|
|
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
2011-08-05 14:11:04 +00:00
|
|
|
|
2014-09-12 16:19:24 +00:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
2017-01-19 11:02:44 +00:00
|
|
|
diff -up cups-2.2.2/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.2/scheduler/org.cups.cupsd.service.in
|
|
|
|
--- cups-2.2.2/scheduler/org.cups.cupsd.service.in.systemd-socket 2017-01-17 20:27:22.000000000 +0100
|
|
|
|
+++ cups-2.2.2/scheduler/org.cups.cupsd.service.in 2017-01-19 11:12:42.029520021 +0100
|
2014-11-15 14:42:30 +00:00
|
|
|
@@ -1,10 +1,11 @@
|
|
|
|
[Unit]
|
2014-09-12 16:19:24 +00:00
|
|
|
Description=CUPS Scheduler
|
2014-11-15 14:42:30 +00:00
|
|
|
Documentation=man:cupsd(8)
|
2014-10-18 14:04:51 +00:00
|
|
|
+After=network.target
|
2014-09-12 16:19:24 +00:00
|
|
|
|
|
|
|
[Service]
|
2015-01-27 11:06:16 +00:00
|
|
|
ExecStart=@sbindir@/cupsd -l
|
2014-09-12 16:19:24 +00:00
|
|
|
-Type=simple
|
|
|
|
+Type=notify
|
2011-08-05 14:11:04 +00:00
|
|
|
|
2014-09-12 16:19:24 +00:00
|
|
|
[Install]
|
|
|
|
Also=org.cups.cupsd.socket org.cups.cupsd.path
|