File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -606,9 +606,6 @@ rm -f /usr/sbin/policy-rc.d
606606sed -i " s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
607607service ssh restart
608608
609- # AppArmor
610- # aa-complain /usr/sbin/named
611-
612609# Disable awstats cron
613610rm -f /etc/cron.d/awstats
614611
@@ -965,6 +962,12 @@ if [ "$named" = 'yes' ]; then
965962 sed -i " s%listen-on%//listen%" /etc/bind/named.conf.options
966963 chown root:bind /etc/bind/named.conf
967964 chmod 640 /etc/bind/named.conf
965+ aa-complain /usr/sbin/named 2> /dev/null
966+ echo " /home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named 2> /dev/null
967+ service apparmor status > /dev/null 2>&1
968+ if [ $? -ne 0 ]; then
969+ service apparmor restart
970+ fi
968971 update-rc.d bind9 defaults
969972 service bind9 start
970973 check_result $? " bind9 start failed"
Original file line number Diff line number Diff line change @@ -595,9 +595,6 @@ rm -f /usr/sbin/policy-rc.d
595595sed -i " s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
596596service ssh restart
597597
598- # AppArmor
599- # aa-complain /usr/sbin/named
600-
601598# Disable awstats cron
602599rm -f /etc/cron.d/awstats
603600
@@ -627,8 +624,6 @@ chmod 755 /usr/bin/rssh
627624# Configure VESTA #
628625# ----------------------------------------------------------#
629626
630- # AppArmor
631- aa-complain /usr/sbin/named 2> /dev/null
632627
633628# Downlading sudo configuration
634629mkdir -p /etc/sudoers.d
@@ -957,6 +952,12 @@ if [ "$named" = 'yes' ]; then
957952 sed -i " s%listen-on%//listen%" /etc/bind/named.conf.options
958953 chown root:bind /etc/bind/named.conf
959954 chmod 640 /etc/bind/named.conf
955+ aa-complain /usr/sbin/named 2> /dev/null
956+ echo " /home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named 2> /dev/null
957+ service apparmor status > /dev/null 2>&1
958+ if [ $? -ne 0 ]; then
959+ service apparmor restart
960+ fi
960961 update-rc.d bind9 defaults
961962 service bind9 start
962963 check_result $? " bind9 start failed"
You can’t perform that action at this time.
0 commit comments