postinst is in conquest-sqlite 1.4.17d-1build1.
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | #!/bin/bash
set -e
PACKAGE=conquest-dicom-server
NAME=dgate
USER=_conquest
GROUP=_conquest
ETCDIR=/etc/$PACKAGE
VARDIR=/var/lib/$PACKAGE
LOGDIR=/var/log/$PACKAGE
# Create conquest user and group
create_user_group() {
if ! getent passwd $USER >/dev/null 2>&1; then
if ! getent group $GROUP > /dev/null 2>&1; then
echo "Adding \`$GROUP' group to system ..."
addgroup --quiet --system --force-badname $GROUP || true
fi
echo "Adding \`$USER' user to system ..."
adduser --quiet --system --ingroup $GROUP --home $ETCDIR --shell \
/bin/false --disabled-password --force-badname $USER || true
fi
}
# DICOM db setup
setup_db() {
echo "We'll regenerate the database..."
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d $NAME regen
else
/etc/init.d/$NAME regen
fi
echo -e "\n\nIf it's the first time you install $PACKAGE, disregard any" \
"error messages about absent database tables."
}
# Change ownership of files
chown_files() {
chown -R $USER:$GROUP $VARDIR $ETCDIR $LOGDIR > /dev/null || true
}
case "$1" in
configure)
create_user_group
chown_files
setup_db
;;
abort-upgrade|abort-deconfigure|abort-remove)
;;
*)
echo "$0 called with unknown argument \`$1'" 1>&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/dgate" ]; then
update-rc.d dgate defaults >/dev/null
fi
if [ -x "/etc/init.d/dgate" ] || [ -e "/etc/init/dgate.conf" ]; then
invoke-rc.d dgate start || exit $?
fi
fi
# End automatically added section
exit 0
|