From ef4cabcfe84055a0a5756c4383800ce37a6c1aa4 Mon Sep 17 00:00:00 2001 From: Antti Kultanen Date: Tue, 4 Feb 2025 17:49:48 +0200 Subject: [PATCH] fix(service): Set address to prevent orphaned dbus-session processes (#16454) Co-authored-by: Antti Kultanen --- scripts/init.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/init.sh b/scripts/init.sh index d01e16a7c..95d1e67d9 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -136,6 +136,10 @@ case $1 in log_failure_msg "set open file limit to $OPEN_FILE_LIMIT" fi + # Set DBUS_SESSION_BUS_ADDRESS if unset to prevent the daemon from + # spawning a stray dbus-session process + export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-/dev/null}" + log_success_msg "Starting the process" "$name" if command -v startproc >/dev/null; then startproc -u "$USER" -g "$GROUP" -p "$pidfile" -q -- "$daemon" -pidfile "$pidfile" -config "$config" -config-directory "$confdir" $TELEGRAF_OPTS