[Unit]
Description=CFEngine Enterprise Redis Report Collection Cache
After=syslog.target
PartOf=cfengine3.service
ConditionPathExists={{{vars.sys.bindir}}}/redis-server
Wants=cf-consumer.service
Wants=cf-hub.service
Before=cf-hub.service
Before=cf-consumer.service

[Service]
Type=forking
ExecStart={{{vars.sys.bindir}}}/redis-server {{{vars.sys.workdir}}}/config/redis.conf
PIDFile={{{vars.sys.workdir}}}/redis-server.pid
Restart=always
RestartSec=10

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