41 lines
1.1 KiB
Diff
41 lines
1.1 KiB
Diff
diff --git a/scheduler/cups.service.in b/scheduler/cups.service.in
|
|
index cd23343..928d77f 100644
|
|
--- a/scheduler/cups.service.in
|
|
+++ b/scheduler/cups.service.in
|
|
@@ -1,11 +1,11 @@
|
|
[Unit]
|
|
Description=CUPS Scheduler
|
|
Documentation=man:cupsd(8)
|
|
-After=sssd.service
|
|
+After=network.target sssd.service
|
|
|
|
[Service]
|
|
ExecStart=@sbindir@/cupsd -l
|
|
-Type=simple
|
|
+Type=notify
|
|
Restart=on-failure
|
|
|
|
[Install]
|
|
diff --git a/scheduler/main.c b/scheduler/main.c
|
|
index 4fee24f..206db30 100644
|
|
--- a/scheduler/main.c
|
|
+++ b/scheduler/main.c
|
|
@@ -706,8 +706,16 @@ main(int argc, /* I - Number of command-line args */
|
|
|
|
#ifdef HAVE_ONDEMAND
|
|
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
|
|
+
|
|
#endif /* HAVE_ONDEMAND */
|
|
if (fg)
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|