21 lines
481 B
Bash
Executable File
21 lines
481 B
Bash
Executable File
#!/bin/bash
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
# Create the apache vHOST for Ironic
|
|
mkdir -p /etc/httpd/conf.d
|
|
sudo cp -r $(dirname $0)/ipxe-vhost.template /etc/httpd/conf.d/10-ipxe_vhost.conf
|
|
|
|
systemctl restart httpd || :
|
|
|
|
[ -x /usr/sbin/semanage ] || exit 0
|
|
|
|
semanage fcontext -a -t httpd_sys_content_t "/httpboot(/.*)?"
|
|
restorecon -Rv /httpboot/
|
|
|
|
# Try to delete port if present
|
|
semanage port -d -t http_port_t -p tcp 8088 || true
|
|
|
|
# Add port
|
|
semanage port -a -t http_port_t -p tcp 8088
|