| 1 | #!/bin/bash |
| 2 | |
| 3 | if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then |
| 4 | set -x |
| 5 | fi |
| 6 | set -eu |
| 7 | set -o pipefail |
| 8 | |
| 9 | enable_selinux_bool () { |
| 10 | policy=$1 |
| 11 | if semanage boolean -l | grep $policy; then |
| 12 | echo "Enabling $policy SELinux policy" |
| 13 | semanage boolean -N -m --on $policy |
| 14 | fi |
| 15 | } |
| 16 | |
| 17 | enable_selinux_bool os_haproxy_enable_nsfs |
| 18 | enable_selinux_bool os_haproxy_ping |
| 19 | enable_selinux_bool cluster_use_execmem |
| 20 | # Allows keepalived to connect to any ports (required by TCP-based HMs on UDP |
| 21 | # pools) |
| 22 | enable_selinux_bool keepalived_connect_any |