PKGBUILDs/extra/cups/cups-systemd-socket.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

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
2019-08-29 18:18:53 +00:00
--- cups-2.3.0/scheduler/org.cups.cupsd.service.in 2019-08-23 17:19:38.000000000 +0200
+++ cups-2.3.0/scheduler/org.cups.cupsd.service.in.new 2019-08-25 20:20:25.805339727 +0200
2020-04-28 12:41:03 +00:00
@@ -1,11 +1,12 @@
2019-08-29 18:18:53 +00:00
[Unit]
2016-08-05 23:31:36 +00:00
Description=CUPS Scheduler
2019-08-29 18:18:53 +00:00
Documentation=man:cupsd(8)
-After=sssd.service
2020-04-28 12:41:03 +00:00
+After=sssd.service network-online.target
+Wants=network-online.target
2016-08-05 23:31:36 +00:00
2019-08-29 18:18:53 +00:00
[Service]
ExecStart=@sbindir@/cupsd -l
-Type=simple
+Type=notify
Restart=on-failure
2016-08-05 23:31:36 +00:00
[Install]