#! /bin/sh set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # LIBRARY=/usr/share/iog OLDLOCATION=/var/www/iog NEWLOCATION=/var/lib/iog CONFIG=/etc/iog.cfg PKGCONFIG=$LIBRARY/iog.cfg case "$1" in configure) chown -R www-data:www-data /var/lib/iog test -x /usr/bin/ucf && ucf --three-way --debconf-ok $PKGCONFIG $CONFIG test -x /usr/bin/ucfr && ucfr iog $CONFIG # Detect an old page depository and activate the desired location. if [ -f $OLDLOCATION/uptimes.pag ] then . /usr/share/debconf/confmodule db_get iog/migrate || RET=false if [ $RET = true ] then mv $OLDLOCATION/* $NEWLOCATION/ 2>/dev/null else # Reactivate old content by reinstalling the purged images. cp -a $LIBRARY/*.gif $OLDLOCATION/ 2>/dev/null fi 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. exit 0