Browse Source

Additional check if apparmor exists.

Raphael Schneeberger 7 years ago
parent
commit
cf31cd443a
2 changed files with 10 additions and 4 deletions
  1. 5 2
      install/hst-install-debian.sh
  2. 5 2
      install/hst-install-ubuntu.sh

+ 5 - 2
install/hst-install-debian.sh

@@ -737,8 +737,11 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if grep --quiet lxc /proc/1/environ; then
 if grep --quiet lxc /proc/1/environ; then
-    systemctl stop apparmor
-    systemctl disable apparmor
+    systemctl status apparmor
+    if [ $? = 0 ]; then
+        systemctl stop apparmor
+        systemctl disable apparmor
+    fi
 fi
 fi
 
 
 
 

+ 5 - 2
install/hst-install-ubuntu.sh

@@ -704,8 +704,11 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if grep --quiet lxc /proc/1/environ; then
 if grep --quiet lxc /proc/1/environ; then
-    systemctl stop apparmor
-    systemctl disable apparmor
+    systemctl status apparmor
+    if [ $? = 0 ]; then
+        systemctl stop apparmor
+        systemctl disable apparmor
+    fi
 fi
 fi