[Unit]
Description=pmlogger farm service
Documentation=man:pmlogger_check(1)
Before=pmlogger_farm_check.timer
BindsTo=pmlogger_farm_check.timer
PartOf=pmlogger.service

[Service]
Type=@SD_SERVICE_TYPE@
Restart=always
# long (but not infinite) start timeout - for logger farms
TimeoutStartSec=4h
TimeoutStopSec=120
# the pmlogger_farm service manages all pmloggers except the primary
Environment="PMLOGGER_CHECK_PARAMS=--skip-primary --quick"
EnvironmentFile=-@PCP_SYSCONFIG_DIR@/pmlogger_timers
ExecStart=@PCP_BINADM_DIR@/pmlogger_farm $PMLOGGER_CHECK_PARAMS
WorkingDirectory=@PCP_VAR_DIR@
Group=@PCP_GROUP@
User=@PCP_USER@

[Install]
RequiredBy=pmlogger.service
