diff --git a/templates/400_process-debian.yaml.tt2 b/templates/400_process-debian.yaml.tt2 index ef49e50..7af0fb6 100644 --- a/templates/400_process-debian.yaml.tt2 +++ b/templates/400_process-debian.yaml.tt2 @@ -17,15 +17,9 @@ process: mysqld_safe: running: [% general.init_system == 'systemd' ? 'false' : 'true' %] - nginx: - running: true - ntpd: running: true - perl-fcgi: - running: true - redis-server: running: true diff --git a/templates/410_process-ngcp.yaml.tt2 b/templates/410_process-ngcp.yaml.tt2 index 1ccfb5d..cfe1d74 100644 --- a/templates/410_process-ngcp.yaml.tt2 +++ b/templates/410_process-ngcp.yaml.tt2 @@ -6,6 +6,7 @@ is_mgmt = ngcp.has_role(hostname, 'mgmt'); is_db = ngcp.has_role(hostname, 'db'); is_rtp = ngcp.has_role(hostname, 'rtp'); + is_li_dist = ngcp.has_role(hostname, 'li_dist'); -%] [% PERL -%] my $node_state = qx(ngcp-check-active -v); @@ -82,6 +83,12 @@ process: ngcp-rate-o-mat: running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %] + nginx: + running: [% (is_mgmt || is_lb || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %] + + perl-fcgi: + running: [% is_mgmt ? 'true' : 'false' %] + rtpengine: running: [% is_rtp && node_state == 'active' ? 'true' : 'false' %] diff --git a/templates/411_process-ngcp-pro.yaml.tt2 b/templates/411_process-ngcp-pro.yaml.tt2 index 45bc2cd..ea15e00 100644 --- a/templates/411_process-ngcp-pro.yaml.tt2 +++ b/templates/411_process-ngcp-pro.yaml.tt2 @@ -40,17 +40,17 @@ process: running: true ngcp-voisniff: - running: [% (is_proxy || is_lb || is_rtp) && node_state == 'active' ? 'true' : 'false' %] + running: [% (is_proxy || is_lb || is_rtp) && node_state == 'active' && voisniff.daemon.start == 'yes' ? 'true' : 'false' %] snmpd: running: true janus: - running: [% (node_state == 'active' && (janus.enable == 'yes' || (rtcengine.conference.enable == 'yes' && rtcengine.conference.type == 'janus'))) ? 'true' : 'false' %] + running: [% is_proxy && (node_state == 'active' && (janus.enable == 'yes' || (rtcengine.conference.enable == 'yes' && rtcengine.conference.type == 'janus'))) ? 'true' : 'false' %] command: "pgrep -c -n -f '[r]tcengine.js'": -[% IF rtcengine.enable == "yes" && node_state == 'active' -%] +[% IF is_proxy && rtcengine.enable == "yes" && node_state == 'active' -%] exit-status: 0 stdout: - "1" @@ -61,7 +61,7 @@ command: stderr: [] "pgrep -c -n -f '[c]omx-fileshare.js'": -[% IF fileshare.enable == "yes" && node_state == 'active' -%] +[% IF is_proxy && fileshare.enable == "yes" && node_state == 'active' -%] exit-status: 0 stdout: - "1" diff --git a/templates/510_init-daemons-ngcp.yaml.tt2 b/templates/510_init-daemons-ngcp.yaml.tt2 index 3dc1bc3..beb2f40 100644 --- a/templates/510_init-daemons-ngcp.yaml.tt2 +++ b/templates/510_init-daemons-ngcp.yaml.tt2 @@ -78,8 +78,8 @@ service: running: true nginx.service: - enabled: [% (is_mgmt || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %] - running: [% (is_mgmt || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %] + enabled: [% (is_mgmt || is_lb || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %] + running: [% (is_mgmt || is_lb || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %] prosody.service: enabled: [% general.process_handler == 'none' && prosody.enable == 'yes' ? 'true' : 'false' %] @@ -91,7 +91,7 @@ service: redis-server.service: enabled: [% redis.enable == "yes" ? 'true' : 'false' %] - running: [% (is_rtp || is_proxy || is_db) && redis.enable == "yes" ? 'true' : 'false' %] + running: [% redis.enable == "yes" ? 'true' : 'false' %] slapd.service: enabled: [% is_mgmt && ldap.enable == "yes" ? 'true' : 'false' %] @@ -133,15 +133,15 @@ service: [% END -%] ngcp-rtcengine.service: enabled: false - running: [% node_state == 'active' && rtcengine.enable == "yes" && general.ngcp_type != 'spce' ? 'true' : 'false' %] + running: [% is_proxy && node_state == 'active' && rtcengine.enable == "yes" && general.ngcp_type != 'spce' ? 'true' : 'false' %] ngcp-comx-fileshare-service.service: enabled: false - running: [% node_state == 'active' && fileshare.enable == "yes" && general.ngcp_type != 'spce' ? 'true' : 'false' %] + running: [% is_proxy && node_state == 'active' && fileshare.enable == "yes" && general.ngcp_type != 'spce' ? 'true' : 'false' %] janus.service: enabled: false - running: [% (node_state == 'active' && general.ngcp_type != 'spce' && (janus.enable == 'yes' || (rtcengine.conference.enable == 'yes' && rtcengine.conference.type == 'janus'))) ? 'true' : 'false' %] + running: [% is_proxy && node_state == 'active' && general.ngcp_type != 'spce' && (janus.enable == 'yes' || (rtcengine.conference.enable == 'yes' && rtcengine.conference.type == 'janus')) ? 'true' : 'false' %] monit.service: enabled: [% general.process_handler == 'monit' ? 'true' : 'false' %]