[Main]
Type = classic
Description = "dbus session daemon for @U user"

[Start]
MaxDeath = 3
Notify = 4
Timeout = 3000
Execute = (
    execl-toc -S ${Socket}
    dbus-daemon ${Args}
)

[Stop]
Execute = (
    s6-rmrf ${Socket}
)

[Environment]
Args=!--session --print-pid=4 --nofork --nopidfile --address=unix:path=${Socket}
Socket=!@R/bus

[Event]
EventType = user
On = ( env.DISPLAY env.WAYLAND_DISPLAY )
Do = restart