[Unit]
Description=OSBuild Composer
After=multi-user.target

# Weldr API needs a local worker by default.
# Run `systemctl mask osbuild-worker@1.service`
# to disable it.
Wants=osbuild-worker@1.service

[Service]
Type=simple
ExecStart=/usr/libexec/osbuild-composer/osbuild-composer
CacheDirectory=osbuild-composer
StateDirectory=osbuild-composer
WorkingDirectory=/usr/libexec/osbuild-composer/
User=_osbuild-composer
Restart=on-failure

# systemd >= 240 sets this, but osbuild-composer runs on earlier versions
Environment="CACHE_DIRECTORY=/var/cache/osbuild-composer"
Environment="STATE_DIRECTORY=/var/lib/osbuild-composer"

[Install]
WantedBy=multi-user.target
