#!/bin/sh # prerm script for sasl2-bin # # 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 SASLDB_FILE=/etc/sasldb2 case "$1" in remove) if [ -e $SASLDB_FILE ] && \ [ `sasldblistusers2 | wc -l` -eq 0 ]; then rm $SASLDB_FILE fi ;; upgrade|deconfigure) ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installinit/13.3.4 if [ -x "/etc/init.d/saslauthd" ] && [ "$1" = remove ]; then invoke-rc.d --skip-systemd-native saslauthd stop || exit 1 fi # End automatically added section exit 0