apparmor install fix

This commit is contained in:
dpeca 2020-01-07 15:33:58 +01:00 committed by GitHub
commit 3dd6c186fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1140,10 +1140,10 @@ if [ "$named" = 'yes' ]; then
# echo "/home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named 2>/dev/null
sed -i "s#/etc/bind/\*\* rw,#/etc/bind/\*\* rw,\n /home/\*\* rwm,#g" /etc/apparmor.d/usr.sbin.named
sed -i "s#/etc/bind/\*\* r,#/etc/bind/\*\* rw,\n /home/\*\* rwm,#g" /etc/apparmor.d/usr.sbin.named
service apparmor status >/dev/null 2>&1
if [ $? -ne 0 ]; then
# service apparmor status >/dev/null 2>&1
# if [ $? -ne 0 ]; then
service apparmor restart
fi
# fi
fi
update-rc.d bind9 defaults
service bind9 start