preinst is in collabtive 2.0+dfsg-6ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #! /bin/sh
# preinst script for collabtive
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
case "$1" in
install|upgrade)
# Pre-0.7 versions had an /etc/collabtive/standard directory
# containing a single file in it — It has been replaced by a
# symlink. Shuffle things around accordingly.
if [ -d /etc/collabtive/standard -a ! -L /etc/collabtive/standard/config.php ]; then
mv /etc/collabtive/standard/* /etc/collabtive/
rm -r /etc/collabtive/standard
ln -s . /etc/collabtive/standard
fi
# Before Apache 2.4, the Collabtive Apache configuration file
# was in /etc/collabtive, symlinked only from
# /etc/apache2/conf.d (a now-obsolete directory). If we are
# upgrading from there, remove the symlink and move the
# conffile into the common practice location.
[ ! -L /etc/apache2/conf-available/collabtive.conf ] || rm /etc/apache2/conf-available/collabtive.conf
dpkg-maintscript-helper mv_conffile /etc/collabtive/apache.conf /etc/apache2/conf-available/collabtive.conf 1.1-1~ collabtive -- "$@"
dpkg-maintscript-helper rm_conffile /etc/apache2/conf.d/collabtive.conf 1.1-1~ collabtive -- "$@"
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|