Zdenek Dohnal ce18aa
diff -up cups-2.2.8/scheduler/main.c.systemd-socket cups-2.2.8/scheduler/main.c
Zdenek Dohnal ce18aa
--- cups-2.2.8/scheduler/main.c.systemd-socket	2018-06-05 18:06:54.000000000 +0200
Zdenek Dohnal 24d583
+++ cups-2.2.8/scheduler/main.c	2018-09-19 10:38:09.285892238 +0200
Zdenek Dohnal ce18aa
@@ -681,8 +681,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
+  {
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 */
52c42a
   if (fg)
6dd074
     cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
Zdenek Dohnal ce18aa
diff -up cups-2.2.8/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.8/scheduler/org.cups.cupsd.path.in
Zdenek Dohnal ce18aa
--- cups-2.2.8/scheduler/org.cups.cupsd.path.in.systemd-socket	2018-06-05 18:06:54.000000000 +0200
Zdenek Dohnal 24d583
+++ cups-2.2.8/scheduler/org.cups.cupsd.path.in	2018-09-19 10:46:11.246666713 +0200
Zdenek Dohnal 24d583
@@ -1,6 +1,6 @@
Zdenek Dohnal 24d583
 [Unit]
Zdenek Dohnal 24d583
 Description=CUPS Scheduler
Zdenek Dohnal 24d583
-PartOf=org.cups.cupsd.service
Zdenek Dohnal 24d583
+PartOf=cups.service
6dd074
 
6dd074
 [Path]
Zdenek Dohnal 24d583
 PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
Zdenek Dohnal ce18aa
diff -up cups-2.2.8/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.8/scheduler/org.cups.cupsd.service.in
Zdenek Dohnal 24d583
--- cups-2.2.8/scheduler/org.cups.cupsd.service.in.systemd-socket	2018-06-05 18:06:54.000000000 +0200
Zdenek Dohnal 24d583
+++ cups-2.2.8/scheduler/org.cups.cupsd.service.in	2018-09-19 10:41:11.378295760 +0200
Zdenek Dohnal 24d583
@@ -1,12 +1,13 @@
fce8f5
 [Unit]
6dd074
 Description=CUPS Scheduler
fce8f5
 Documentation=man:cupsd(8)
Tim Waugh 6865fd
+After=network.target
6dd074
 
6dd074
 [Service]
Tim Waugh e946d3
 ExecStart=@sbindir@/cupsd -l
6dd074
-Type=simple
6dd074
+Type=notify
Zdenek Dohnal ce18aa
 Restart=on-failure
Tim Waugh 9829b0
 
6dd074
 [Install]
Zdenek Dohnal 24d583
-Also=org.cups.cupsd.socket org.cups.cupsd.path
Zdenek Dohnal 24d583
+Also=cups.socket cups.path
Zdenek Dohnal 24d583
 WantedBy=printer.target
Zdenek Dohnal 24d583
diff -up cups-2.2.8/scheduler/org.cups.cupsd.socket.in.systemd-socket cups-2.2.8/scheduler/org.cups.cupsd.socket.in
Zdenek Dohnal 24d583
--- cups-2.2.8/scheduler/org.cups.cupsd.socket.in.systemd-socket	2018-09-19 10:42:21.411681757 +0200
Zdenek Dohnal 24d583
+++ cups-2.2.8/scheduler/org.cups.cupsd.socket.in	2018-09-19 10:42:44.819476530 +0200
Zdenek Dohnal 24d583
@@ -1,6 +1,6 @@
Zdenek Dohnal 24d583
 [Unit]
Zdenek Dohnal 24d583
 Description=CUPS Scheduler
Zdenek Dohnal 24d583
-PartOf=org.cups.cupsd.service
Zdenek Dohnal 24d583
+PartOf=cups.service
Zdenek Dohnal 24d583
 
Zdenek Dohnal 24d583
 [Socket]
Zdenek Dohnal 24d583
 ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
Zdenek Dohnal 24d583
diff -up cups-2.2.8/scheduler/org.cups.cups-lpd.socket.systemd-socket cups-2.2.8/scheduler/org.cups.cups-lpd.socket
Zdenek Dohnal 24d583
--- cups-2.2.8/scheduler/org.cups.cups-lpd.socket.systemd-socket	2018-09-19 10:53:59.222563802 +0200
Zdenek Dohnal 24d583
+++ cups-2.2.8/scheduler/org.cups.cups-lpd.socket	2018-09-19 10:54:16.483412464 +0200
Zdenek Dohnal 24d583
@@ -1,6 +1,6 @@
Zdenek Dohnal 24d583
 [Unit]
Zdenek Dohnal 24d583
 Description=CUPS LPD Server Socket
Zdenek Dohnal 24d583
-PartOf=org.cups.cups-lpd.service
Zdenek Dohnal 24d583
+PartOf=cups-lpd.service
Zdenek Dohnal 24d583
 
Zdenek Dohnal 24d583
 [Socket]
Zdenek Dohnal 24d583
 ListenStream=515