11c8e3
From 752de46cc57215b14b55f2c68334178454d7444f Mon Sep 17 00:00:00 2001
11c8e3
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
11c8e3
Date: Mon, 24 Jan 2022 22:14:31 -0500
11c8e3
Subject: [PATCH] printing/bgqd: Disable systemd notifications
11c8e3
11c8e3
samba-bgqd daemon is started by existing Samba daemons. When running
11c8e3
under systemd, those daemons control systemd notifications and
11c8e3
samba-bgqd messages need to be silenced.
11c8e3
11c8e3
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14947
11c8e3
11c8e3
Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
11c8e3
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11c8e3
Reviewed-by: Andreas Schneider <asn@samba.org>
11c8e3
(cherry picked from commit 36c861e25b1d9c5ce44bfcb46247e7e4747930c5)
11c8e3
---
11c8e3
 source3/printing/samba-bgqd.c | 3 +++
11c8e3
 1 file changed, 3 insertions(+)
11c8e3
11c8e3
diff --git a/source3/printing/samba-bgqd.c b/source3/printing/samba-bgqd.c
11c8e3
index f21327fc622..59ed0cc40db 100644
11c8e3
--- a/source3/printing/samba-bgqd.c
11c8e3
+++ b/source3/printing/samba-bgqd.c
11c8e3
@@ -252,6 +252,9 @@ int main(int argc, const char *argv[])
11c8e3
 
11c8e3
 	log_stdout = (debug_get_log_type() == DEBUG_STDOUT);
11c8e3
 
11c8e3
+	/* main process will notify systemd */
11c8e3
+	daemon_sd_notifications(false);
11c8e3
+
11c8e3
 	if (!cmdline_daemon_cfg->fork) {
11c8e3
 		daemon_status(progname, "Starting process ... ");
11c8e3
 	} else {
11c8e3
-- 
11c8e3
2.34.1
11c8e3