浏览代码

Disable apparmor on lxc containers.

Raphael Schneeberger 7 年之前
父节点
当前提交
753a1f6342
共有 2 个文件被更改,包括 19 次插入0 次删除
  1. 9 0
      install/hst-install-debian.sh
  2. 10 0
      install/hst-install-ubuntu.sh

+ 9 - 0
install/hst-install-debian.sh

@@ -732,6 +732,15 @@ if [ "$phpfpm" = 'yes' ]; then
     software=$(echo "$software" | sed -e 's/php-mysql//')
 fi
 
+#----------------------------------------------------------#
+                  Disable Apparmor on LCX                  #
+#----------------------------------------------------------#
+
+if grep --quiet lxc /proc/1/environ; then
+    systemctl stop apparmor
+    systemctl disable apparmor
+fi
+
 
 #----------------------------------------------------------#
 #                     Install packages                     #

+ 10 - 0
install/hst-install-ubuntu.sh

@@ -699,6 +699,16 @@ if [ "$phpfpm" = 'yes' ]; then
 fi
 
 
+#----------------------------------------------------------#
+                  Disable Apparmor on LCX                  #
+#----------------------------------------------------------#
+
+if grep --quiet lxc /proc/1/environ; then
+    systemctl stop apparmor
+    systemctl disable apparmor
+fi
+
+
 #----------------------------------------------------------#
 #                     Install packages                     #
 #----------------------------------------------------------#