From 708c20cfa04cd0553b53c307866ecf61ee0f0a68 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 5 Jul 2019 22:27:44 +0200 Subject: [PATCH] TT#60750 Assume monit is running and enabled based on general.process_handler We should not assume monit is always running and enabled, that depends on whether it is configured as the current process_handler. This will make it easier to remove in the future. Change-Id: I8851728228dd3e46323d9745ed04da49b18ff928 --- templates/411_process-ngcp-pro.yaml.tt2 | 2 +- templates/510_init-daemons-ngcp.yaml.tt2 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/411_process-ngcp-pro.yaml.tt2 b/templates/411_process-ngcp-pro.yaml.tt2 index 2c2a1ea..306544c 100644 --- a/templates/411_process-ngcp-pro.yaml.tt2 +++ b/templates/411_process-ngcp-pro.yaml.tt2 @@ -28,7 +28,7 @@ process: running: true monit: - running: true + running: [% general.process_handler == 'monit' ? 'true' : 'false' %] ngcp-licensed: running: [% general.license_key != '' || general.anonymous_usage_statistics == 'yes' ? 'true' : 'false' %] diff --git a/templates/510_init-daemons-ngcp.yaml.tt2 b/templates/510_init-daemons-ngcp.yaml.tt2 index fa24306..24cf151 100644 --- a/templates/510_init-daemons-ngcp.yaml.tt2 +++ b/templates/510_init-daemons-ngcp.yaml.tt2 @@ -143,11 +143,11 @@ service: enabled: false running: [% node_state == 'active' && janus.enable == "yes" && general.ngcp_type != 'spce' ? 'true' : 'false' %] -[% IF general.ngcp_type != 'spce' -%] monit.service: - enabled: true - running: true + enabled: [% general.process_handler == 'monit' ? 'true' : 'false' %] + running: [% general.process_handler == 'monit' ? 'true' : 'false' %] +[% IF general.ngcp_type != 'spce' -%] heartbeat.service: enabled: true running: true