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