preinst is in otrs2 5.0.7-1.
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 | #!/bin/sh
set -e
OTRSHOME=/usr/share/otrs
OTRS_VAR=/var/lib/otrs
case "$1" in
install)
adduser --system --home $OTRSHOME --no-create-home --ingroup www-data otrs
;;
upgrade)
if [ -e "$OTRSHOME/Kernel/Config/Files" ]; then
if [ ! -h "$OTRSHOME/Kernel/Config/Files" ]; then
# Move dir to new location.
mkdir -p $OTRS_VAR/Config
mkdir -p $OTRS_VAR/Config_deb_upgrade
mv $OTRSHOME/Kernel/Config/Files $OTRS_VAR/Config/
fi
fi
if [ -e "$OTRS_VAR/Config/ZZZAuto.pm" ]; then
mv $OTRS_VAR/Config/ZZZAuto.pm $OTRS_VAR/Config/Files/ZZZAuto.pm
cp $OTRS_VAR/Config/Files/ZZZAuto.pm $OTRS_VAR/Config_deb_upgrade
fi
if [ -e "$OTRS_VAR/Config/ZZZAAuto.pm" ]; then
mv $OTRS_VAR/Config/ZZZAAuto.pm $OTRS_VAR/Config/Files/ZZZAAuto.pm
cp $OTRS_VAR/Config/Files/ZZZAAuto.pm $OTRS_VAR/Config_deb_upgrade
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" 1>&2
exit 1
;;
esac
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/init.d/otrs2 3.3.6-1 -- "$@"
# End automatically added section
|