remove systemd selinux rules on init systems

fixes the failing SELinux policy compile on init based systems
pull/779/head
bcambl 8 years ago
parent e5ede16749
commit f4f8b96788

@ -841,6 +841,9 @@ configureSelinux() {
printf "::: Enabling httpd server side includes (SSI).. "
setsebool -P httpd_ssi_exec on &> /dev/null && echo "Success" || echo "SELinux not enabled"
printf "\n:::\tCompiling Pi-Hole SELinux policy..\n"
if ! [ -x "$(command -v systemctl)" ]; then
sed -i.bak '/systemd/d' /etc/.pihole/advanced/selinux/pihole.te
fi
checkmodule -M -m -o /etc/pihole/pihole.mod /etc/.pihole/advanced/selinux/pihole.te
semodule_package -o /etc/pihole/pihole.pp -m /etc/pihole/pihole.mod
semodule -i /etc/pihole/pihole.pp

Loading…
Cancel
Save