Project

General

Profile

Download (612 Bytes) Statistics
| Branch: | Tag: | Revision:
#!/bin/bash
set +e

# Unload foreman policy and set booleans. Dependant booleans must be managed in
# a separate transaction. Do not forget to edit countepart file
# (enable/disable) when updating this script.
for selinuxvariant in targeted
do
if /usr/sbin/semodule -s $selinuxvariant -l >/dev/null; then
# Remove all user defined ports (including the default one)
/usr/sbin/semanage port -E | \
grep -E '(elasticsearch|docker)_port_t' | \
sed s/-a/-d/g | \
/usr/sbin/semanage -S $selinuxvariant -i -
# Unload policy
/usr/sbin/semodule -s $selinuxvariant -r foreman
fi
done
(13-13/20)