1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-04 00:17:06 +00:00

Don't apply apparmor configuration when apparmor is disabled (eg. travis-ci)

This commit is contained in:
downtownallday 2020-06-02 11:21:59 -04:00
parent c945d8fbb3
commit 1d789dbe53
2 changed files with 6 additions and 4 deletions

View File

@ -10,11 +10,11 @@ os: linux
dist: bionic dist: bionic
before_install: before_install:
- echo "Updating system" - sudo aa-status
- sudo apt-get update - sudo apt-get update
install: install:
- sudo ./setup/start.sh - sudo ./setup/start.sh -v
script: script:
- sudo ./tests/runner.sh - sudo ./tests/runner.sh

View File

@ -632,8 +632,10 @@ update_apparmor() {
EOF EOF
chmod 0644 /etc/apparmor.d/local/usr.sbin.slapd chmod 0644 /etc/apparmor.d/local/usr.sbin.slapd
# Load settings into the kernel # Load settings into the kernel only if AppArmor is enabled
apparmor_parser -r /etc/apparmor.d/usr.sbin.slapd if aa-status --enabled; then
apparmor_parser -r /etc/apparmor.d/usr.sbin.slapd
fi
} }