vn-host/debian/vn-host.postinst

57 lines
1.8 KiB
Bash

#! /bin/sh
# postinst script for vn-host
#
# see: dh_installdeb(1)
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
set -e
CERTS="VerdnaturaCA.crt VerdnaturaIntermediateLab.crt VerdnaturaInformaticaCA.crt"
CERTSDIR=/usr/share/ca-certificates
VERDNATURACERTSDIR="${CERTSDIR}/verdnatura"
LOCALCERTSDIR=/usr/local/share/ca-certificates
case "$1" in
configure)
# Force install verdnatura certificates from installation directory
# update-ca-certificates only process files in /usr/local/share/ca-certificates
# See lintian-explain-tags dir-in-usr-local for more explain
for certfile in ${CERTS} ; do
ln -s ${VERDNATURACERTSDIR}/${certfile} ${LOCALCERTSDIR}
done
;;
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