#! /bin/bash
set -e
if [ -d /sys/kernel/security/apparmor ]
then
  if command -v aa-exec > /dev/null
  then
    exec aa-exec -p unconfined "$@"
  else
    echo "WARNING: AppArmor is installed, but aa-exec cannot found (needed to unconfine Miriway)"
  fi
fi
exec "$@"