mirror of
https://github.com/HorlogeSkynet/archey4
synced 2024-09-07 16:00:12 +02:00
![Samuel FORESTIER](/assets/img/avatar_default.png)
Co-authored-by: Alexandre Pujol <alexandre@pujol.io> Co-authored-by: Michael Bromilow <developer@bromilow.uk>
25 lines
624 B
Bash
25 lines
624 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
# Handles AppArmor profile (see dh_apparmor).
|
|
APP_PROFILE="/etc/apparmor.d/usr.bin.archey4"
|
|
if [ -f "$APP_PROFILE" ]; then
|
|
# Add the local/ include
|
|
LOCAL_APP_PROFILE="/etc/apparmor.d/local/usr.bin.archey4"
|
|
|
|
test -e "$LOCAL_APP_PROFILE" || {
|
|
mkdir -p "$(dirname "$LOCAL_APP_PROFILE")"
|
|
install --mode 644 /dev/null "$LOCAL_APP_PROFILE"
|
|
}
|
|
|
|
# Reload the profile, including any abstraction updates
|
|
if aa-enabled --quiet 2>/dev/null; then
|
|
apparmor_parser -r -T -W "$APP_PROFILE" || true
|
|
fi
|
|
fi
|
|
|
|
# Creates a symbolic link providing `archey4` command alias.
|
|
ln -s -f /usr/bin/archey /usr/bin/archey4
|