diff --git a/jobs/nats/monit b/jobs/nats/monit index b4167b884ef..0003d9bf7b6 100644 --- a/jobs/nats/monit +++ b/jobs/nats/monit @@ -4,12 +4,13 @@ check process nats stop program "/var/vcap/jobs/bpm/bin/bpm stop nats" group vcap +check file nats_auth_conf + with path /var/vcap/data/nats/auth.json + if changed checksum then exec "/var/vcap/packages/nats/bin/nats-server --signal reload=/var/vcap/sys/run/bpm/nats/nats.pid" + check process bosh_nats_sync with pidfile /var/vcap/sys/run/bpm/nats/bosh_nats_sync.pid start program "/var/vcap/jobs/bpm/bin/bpm start nats -p bosh_nats_sync" stop program "/var/vcap/jobs/bpm/bin/bpm stop nats -p bosh_nats_sync" group vcap - -check file nats_auth_conf - with path /var/vcap/data/nats/auth.json - if changed checksum then exec "/var/vcap/packages/nats/bin/nats-server --signal reload=/var/vcap/sys/run/bpm/nats/nats.pid" + depends on nats_auth_conf