#!/bin/sh # postinst script for n4d-ldap # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) if dpkg --compare-versions "$2" lt 0.20; then cp /usr/share/n4d-ldap/one-shots/ldap-fix-epoptes /etc/n4d/one-shot/ service n4d restart || true fi if dpkg --compare-versions "$2" lt 0.21; then echo "Fixing netadmin..." cp /usr/share/n4d-ldap/one-shots/ldap-fix-netadmin /etc/n4d/one-shot/ service n4d restart || true fi if dpkg --compare-versions "$2" lt 0.27; then cp /usr/share/n4d-ldap/one-shots/ldap_update.py /etc/n4d/one-shot/ service n4d restart || true fi if dpkg --compare-versions "$2" lt 0.31; then if [ -e '/var/lib/lliurex-folders/local/students' ]; then cp /usr/share/n4d/templates/folder/students /var/lib/lliurex-folders/local/ fi fi if dpkg --compare-versions "$2" lt 0.34.1; then cp /usr/share/n4d-ldap/one-shots/ldap_password.py /etc/n4d/one-shot/ invoke-rc.d n4d restart || true fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0