[Main]
Type = classic
Version = %%VERSION%%
Description = "dbus system daemon"
User = ( root )
MaxDeath = 3
Notify = 4
TimeoutStart = 3000

[Start]
Execute = (
    %%BINDIR%%/execl-toc -S ${Socket} -m 0755
    if {
        %%BINDIR%%/execl-toc -d /var/lib/dbus
        %%BINDIR%%/dbus-uuidgen --ensure
    }
    %%BINDIR%%/execl-cmdline -s { %%BINDIR%%/dbus-daemon ${Args} }
)

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

[Environment]
Args=!--system --print-pid=4 --nofork --nopidfile --address=unix:path=${Socket}
Socket=!/run/dbus/system_bus_socket
