2016-08-05 23:31:36 +00:00
|
|
|
diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c
|
|
|
|
--- cups-2.0.2/scheduler/main.c.ustTJg 2015-02-10 13:40:24.121547526 +0100
|
|
|
|
+++ cups-2.0.2/scheduler/main.c 2015-02-10 13:40:24.295545063 +0100
|
2016-09-25 13:02:29 +00:00
|
|
|
@@ -690,8 +690,15 @@ main(int argc, /* I - Number of comm
|
2016-08-05 23:31:36 +00:00
|
|
|
|
2016-09-25 13:02:29 +00:00
|
|
|
#if defined(HAVE_ONDEMAND)
|
2016-08-05 23:31:36 +00:00
|
|
|
if (OnDemand)
|
|
|
|
+ {
|
|
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
|
|
|
- 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-09-25 13:02:29 +00:00
|
|
|
#endif /* HAVE_ONDEMAND */
|
2016-08-05 23:31:36 +00:00
|
|
|
if (fg)
|
|
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
|
|
|
diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in
|
|
|
|
--- cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg 2014-03-21 15:50:24.000000000 +0100
|
|
|
|
+++ cups-2.0.2/scheduler/org.cups.cupsd.path.in 2015-02-10 13:40:24.295545063 +0100
|
|
|
|
@@ -2,7 +2,7 @@
|
|
|
|
Description=CUPS Scheduler
|
|
|
|
|
|
|
|
[Path]
|
|
|
|
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
|
|
|
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
diff -up cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.service.in
|
|
|
|
--- cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg 2014-10-21 13:55:01.000000000 +0200
|
|
|
|
+++ cups-2.0.2/scheduler/org.cups.cupsd.service.in 2015-02-10 13:40:24.296545049 +0100
|
|
|
|
@@ -1,10 +1,11 @@
|
|
|
|
[Unit]
|
|
|
|
Description=CUPS Scheduler
|
|
|
|
Documentation=man:cupsd(8)
|
|
|
|
+After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStart=@sbindir@/cupsd -l
|
|
|
|
-Type=simple
|
|
|
|
+Type=notify
|
2018-03-30 16:34:08 +00:00
|
|
|
Restart=always
|
2016-08-05 23:31:36 +00:00
|
|
|
|
|
|
|
[Install]
|
2018-03-30 16:34:08 +00:00
|
|
|
|