fix(service): Set address to prevent orphaned dbus-session processes (#16454)

Co-authored-by: Antti Kultanen <antti.kultanen@molukki.com>
This commit is contained in:
Antti Kultanen 2025-02-04 17:49:48 +02:00 committed by GitHub
parent 51cddd9c94
commit ef4cabcfe8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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