[Unit]
Description=CFEngine Enterprise Report Consumer
PartOf=cfengine3.service
After=syslog.target
After=cf-postgres.service
After=cf-redis-server.service
ConditionPathExists={{{vars.sys.bindir}}}/cf-consumer
BindsTo=cf-redis-server.service
BindsTo=cf-postgres.service

[Service]
Type=simple
ExecStart={{{vars.sys.bindir}}}/cf-consumer --no-fork --verbose
Restart=always
RestartSec=10
PIDFile={{{vars.sys.workdir}}}/cf-consumer.pid

[Install]
WantedBy=multi-user.target
WantedBy=cfengine3.service
WantedBy=cf-redis-server.service
