[Main]
Type = classic
Version = %%VERSION%%
Description = "greetd daemon"
User = ( root )
OptsDepends = ( seatd consolekit )
InTree = session

[Start]
Execute = ( %%BINDIR%%/execl-cmdline -s { greetd ${Args} } )

[Stop]
# greetd exits if the configured greeter failed to start;
# if this happens, we do not want to restart greetd in order to
# avoid a crashloop.
# See: https://todo.sr.ht/~kennylevinsen/greetd/12
Execute = ( s6-permafailon 30 1 0-255 )

[Environment]
Args=!-c /etc/greetd/config.toml
