# af-main - postinst
#!/bin/sh
set -e

if [ -n "$D" ]; then
    $INTERCEPT_DIR/postinst_intercept delay_to_first_boot af-main mlprefix=
    exit 0
fi
    if true; then
        chgrp afm $D/var/local/lib/systemd/system
        chgrp afm $D/var/local/lib/systemd/system/afm-user-session@.target.wants
        chgrp afm $D/var/local/lib/systemd/user/default.target.wants
        chgrp afm $D/var/local/lib/systemd/user/sockets.target.wants
    fi
    chown afm:afm $D/var/local/lib/afm
    chown afm:afm $D/var/local/lib/afm/applications
    chown afm:afm $D/var/local/lib/afm/icons
    if true; then
        chsmack -a 'System::Shared' -t $D/var/local/lib/systemd/system
        chsmack -a 'System::Shared' -t $D/var/local/lib/systemd/system/afm-user-session@.target.wants
        chsmack -a 'System::Shared' -t $D/var/local/lib/systemd/user/default.target.wants
        chsmack -a 'System::Shared' -t $D/var/local/lib/systemd/user/sockets.target.wants
    fi
    chsmack -a 'System::Shared' -t $D/var/local/lib/afm
    chsmack -a 'System::Shared' -t $D/var/local/lib/afm/applications
    chsmack -a 'System::Shared' -t $D/var/local/lib/afm/icons