Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cfe_internal/enterprise/mission_portal.cf
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,28 @@ bundle agent apachectl_patched_for_upgrade
edit_template => "$(this.promise_dirname)/templates/apachectl.mustache",
handle => "apachectl_content_pre_create_default_templated_files",
template_method => "mustache",
template_data => parsejson( '{ "cfengine_enterprise_mission_portal_httpd_dir": "$(sys.workdir)/httpd" }');
template_data => parsejson( '{ "cfengine_enterprise_mission_portal_httpd_dir": "$(sys.workdir)/httpd" }'),
classes => results("bundle", "apachectl_file");

_running_cfengine_version_where_templated_files_NOT_automatically_created::
"$(sys.workdir)/httpd/bin/apachectl"
create => "true",
edit_template => "$(this.promise_dirname)/templates/apachectl.mustache",
handle => "apachectl_content_post_create_default_templated_files",
template_method => "mustache",
template_data => parsejson( '{ "cfengine_enterprise_mission_portal_httpd_dir": "$(sys.workdir)/httpd" }');
template_data => parsejson( '{ "cfengine_enterprise_mission_portal_httpd_dir": "$(sys.workdir)/httpd" }'),
classes => results("bundle", "apachectl_file");

cfengine::
"$(sys.workdir)/httpd/bin/apachectl"
handle => "apachectl_perms",
perms => mog( "0755", "root", "root" );

commands:
# This only runs if apachectl touched (repaired) and restorecon path exists
apachectl_file_repaired.default:_stdlib_path_exists_restorecon::
"$(default:paths.restorecon) $(sys.workdir)/httpd/bin/apachectl"
comment => "Ensure the templated apachectl has the correct SELinux context.";
}

bundle agent cfe_internal_enterprise_mission_portal_apache
Expand Down