#!/bin/sh set -e if [ "$1" = "configure" ] ; then APP_PROFILE=/etc/apparmor.d/usr.sbin.slapd LOCAL_APP_PROFILE=/etc/apparmor.d/local/usr.sbin.slapd if [ ! -r "$LOCAL_APP_PROFILE" ] ; then # Create the local profile if it does not yet exist tmp=`mktemp` cat < "$tmp" # Site-specific additions and overrides for usr.sbin.slapd. # For more details, please see /etc/apparmor.d/local/README. EOM mkdir -p `dirname $LOCAL_APP_PROFILE` 2>/dev/null || true mv -f "$tmp" "$LOCAL_APP_PROFILE" chmod 644 "$LOCAL_APP_PROFILE" fi grep -q "AppArmor profile for NorduGrid ARC ARIS" "$LOCAL_APP_PROFILE" || \ cat <> "$LOCAL_APP_PROFILE" # AppArmor profile for NorduGrid ARC ARIS START #include /etc/bdii/* r, /usr/share/arc/ldap-schema/* r, /{,var/}run/arc/infosys/bdii-slapd.conf r, /var/lib/arc/bdii/db/** rwk, /{,var/}run/arc/bdii/db/* w, # AppArmor profile for NorduGrid ARC ARIS END EOM if [ -r "$APP_PROFILE" ] ; then # Reload the profile if aa-status --enabled 2>/dev/null ; then apparmor_parser -r -T -W "$APP_PROFILE" || true fi fi fi # Automatically added by dh_installinit/13.15.3 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -z "${DPKG_ROOT:-}" ] && [ -x "/etc/init.d/arc-infosys-ldap" ]; then update-rc.d arc-infosys-ldap defaults-disabled >/dev/null if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi invoke-rc.d --skip-systemd-native arc-infosys-ldap $_dh_action || exit 1 fi fi # End automatically added section # Automatically added by dh_installsystemd/13.15.3 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if deb-systemd-helper debian-installed 'arc-infosys-ldap.service'; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper unmask 'arc-infosys-ldap.service' >/dev/null || true if deb-systemd-helper --quiet was-enabled 'arc-infosys-ldap.service'; then # Create new symlinks, if any. deb-systemd-helper enable 'arc-infosys-ldap.service' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper update-state 'arc-infosys-ldap.service' >/dev/null || true fi # End automatically added section # Automatically added by dh_installsystemd/13.15.3 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi deb-systemd-invoke $_dh_action 'arc-infosys-ldap.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemd/13.15.3 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi deb-systemd-invoke $_dh_action 'arc-infosys-ldap-slapd.service' >/dev/null || true fi fi # End automatically added section