# container based pipedream collector thingies
description "docker pipedream collectors"
author "dnorton"

start on filesystem and started docker
stop on runlevel [!2345]

# Automatically restart process if crashed (limit 3 times in 4 minutes)
respawn limit 3 240

pre-start script
    logger "starting collectors"
end script

chdir  /etc/docker-compose/collectors
exec docker-compose up

post-start script
    logger "collectors up"
end script

pre-stop script
    docker-compose stop
end script
