postinst is in ampache 3.6-rzb2779+dfsg-0ubuntu9.
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 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
if [ "$1" = "configure" ] || [ "$1" = "upgrade" ]; then
if [ -e /usr/bin/ucf ]; then
ucf --debconf-ok --three-way \
/usr/share/ampache/www/config/ampache.conf /etc/ampache/ampache.conf
ucfr ampache /usr/share/ampache/www/config/ampache.conf
fi
#ask to restart web server
db_get ampache/restart_webserver || true
re_start="$RET"
if [ "$re_start" = "false" ]; then
printf "postinst: User answered false, nothing to do"
elif [ "$re_start" = "true" ]; then
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enconf ampache.conf || exit $?
fi
else
printf "postinst: Something weird has happened, unable to configure ampache.\n"
fi
fi
# Automatically added by dh_apache2
if true; then
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
for conf in ampache ; do
apache2_invoke enconf $conf || exit $?
done
fi
fi
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/logrotate.d/ampache 3.6-git408e713+dfsg-3.1 ampache -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/cron.daily/ampache 3.6-git408e713+dfsg-3.1 ampache -- "$@"
# End automatically added section
exit 0
|