Skip to content

Commit e09db5e

Browse files
author
Antti Kultanen
committed
fix: Set DBus session address in SysV init script to prevent oprhaned dbus-session processes
1 parent 5b8dc15 commit e09db5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/init.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ case $1 in
136136
log_failure_msg "set open file limit to $OPEN_FILE_LIMIT"
137137
fi
138138

139+
# Set DBUS_SESSION_BUS_ADDRESS if unset to prevent the daemon from
140+
# spawning a stray dbus-session process
141+
export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-/dev/null}"
142+
139143
log_success_msg "Starting the process" "$name"
140144
if command -v startproc >/dev/null; then
141145
startproc -u "$USER" -g "$GROUP" -p "$pidfile" -q -- "$daemon" -pidfile "$pidfile" -config "$config" -config-directory "$confdir" $TELEGRAF_OPTS

0 commit comments

Comments
 (0)