]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/main.c
Printer sharing did not work when systemd was being used (STR #4497)
[thirdparty/cups.git] / scheduler / main.c
index 259efd78e69926f2864fd4d98b3965c8dffca41a..78243def0e54ae3eb06590ad3ee45b614ba0dea9 100644 (file)
@@ -763,6 +763,9 @@ main(int  argc,                             /* I - Number of command-line args */
 
     if (timeout == 86400 && OnDemand && IdleExitTimeout &&
         !cupsArrayCount(ActiveJobs) &&
+#  ifdef HAVE_SYSTEMD
+        !WebInterface &&
+#  endif /* HAVE_SYSTEMD */
        (!Browsing || !BrowseLocalProtocols || !cupsArrayCount(Printers)))
     {
       timeout          = IdleExitTimeout;
@@ -2114,8 +2117,12 @@ service_checkout(void)
   * jobs or shared printers to advertise...
   */
 
-  if (cupsArrayCount(ActiveJobs) ||
+  if (cupsArrayCount(ActiveJobs) ||    /* Active jobs */
+#  ifdef HAVE_SYSTEMD
+      WebInterface ||                  /* Web interface enabled */
+#  endif /* HAVE_SYSTEMD */
       (Browsing && BrowseLocalProtocols && cupsArrayCount(Printers)))
+                                       /* Printers being shared */
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG, "Creating keep-alive file \"" CUPS_KEEPALIVE "\".");