Check if SElinux is enforced and skip loading module if disabled.

This commit is contained in:
Marin Jankovski 2015-07-09 13:43:58 +02:00
parent c04dd90e2f
commit 5707ef1d25
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@
if RedhatHelper.system_is_rhel7?
ssh_keygen_module = 'gitlab-7.2.0-ssh-keygen'
execute "semodule -i /opt/gitlab/embedded/selinux/rhel/7/#{ssh_keygen_module}.pp" do
not_if "getenforce | grep Disabled"
not_if "semodule -l | grep '^#{ssh_keygen_module}\\s'"
end
end