#!/bin/sh #script for n4d-ldap # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package PACKAGE_NAME="n4d-samba" ORIGINAL_FILE="/etc/init.d/smbd" DIVERT_FILE="/usr/share/n4d-samba/diversions/etc.initd.smbd.divert" LLIUREX_FILE="/usr/sbin/smbd-daemon-starter" case "$1" in upgrade|deconfigure) ;; remove|purge) if [ -f ${DIVERT_FILE} ] ; then rm -rf $LLIUREX_FILE || true dpkg-divert --package ${PACKAGE_NAME} --rename --quiet --remove ${ORIGINAL_FILE}|| true systemctl daemon-reload || true update-rc.d slapd enable 2 3 4 5 || true fi ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER#