cups/cups-systemd-socket.patch

49 lines
1.8 KiB
Diff
Raw Normal View History

2015-02-10 13:34:09 +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
@@ -658,8 +658,15 @@ main(int argc, /* I - Number of comm
#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
if (OnDemand)
+ {
2014-09-12 16:19:24 +00:00
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
2014-09-12 16:19:24 +00:00
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
if (fg)
2014-09-12 16:19:24 +00:00
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
2015-02-10 13:34:09 +00:00
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
2014-09-12 16:19:24 +00:00
@@ -2,7 +2,7 @@
Description=CUPS Scheduler
[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
2015-02-10 13:34:09 +00:00
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
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]
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