Restore SELinux tags after install
This commit is contained in:
parent
d2ffb6d91d
commit
9a6d5b0175
|
@ -46,7 +46,7 @@ Vagrant.configure("2") do |config|
|
|||
end
|
||||
config.vm.define "centos" do |os|
|
||||
os.vm.box = 'centos/7'
|
||||
provision_libretime(os, "centos.sh", installer_args + "--ignore-dependencies --distribution=centos --web-user=apache")
|
||||
provision_libretime(os, "centos.sh", installer_args + "--ignore-dependencies --distribution=centos --web-user=apache --selinux")
|
||||
end
|
||||
|
||||
def provision_libretime(config, prepare_script, installer_args)
|
||||
|
|
21
install
21
install
|
@ -49,7 +49,10 @@ showhelp () {
|
|||
-a, --apache
|
||||
Install apache and deploy a basic configuration for Airtime
|
||||
-i, --icecast
|
||||
Install Icecast 2 and deploy a basic configuration for Airtime"
|
||||
Install Icecast 2 and deploy a basic configuration for Airtime
|
||||
--selinux
|
||||
Run restorecon on directories and files that need tagging to
|
||||
allow the WEB_USER access."
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -67,6 +70,7 @@ postgres="f"
|
|||
apache="f"
|
||||
icecast="f"
|
||||
ignore_dependencies="f"
|
||||
selinux="f"
|
||||
# Interactive
|
||||
_i=1
|
||||
# Verbose
|
||||
|
@ -223,6 +227,9 @@ while :; do
|
|||
--web-port=?*)
|
||||
web_port=${1#*=}
|
||||
;;
|
||||
--selinux)
|
||||
selinux="t"
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
|
@ -747,6 +754,18 @@ if [ "$ignore_dependencies" = "f" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# If the user requested it we run restorecon on files that need
|
||||
# tagging for selinux.
|
||||
if [ "$selinux" = "t" ]; then
|
||||
loud "\n-----------------------------------------------------"
|
||||
loud " * Restoring SELinux Tags * "
|
||||
loud "-----------------------------------------------------"
|
||||
|
||||
verbose "\n * Running restorecon..."
|
||||
loudCmd "restorecon -Rv /etc/airtime /srv/airtime > /dev/null 2>&1"
|
||||
verbose "...Done"
|
||||
fi
|
||||
|
||||
verbose "\n * Reloading apache..."
|
||||
if [ "$dist" != "centos" ]; then
|
||||
loudCmd "service ${apache_bin} reload 2>/dev/null"
|
||||
|
|
Loading…
Reference in New Issue