#!/bin/sh set -e lighttpd_remove() { if which lighty-disable-mod >/dev/null 2>&1 ; then lighty-disable-mod tt-rss || true fi if [ -L /etc/lighttpd/conf-enabled/50-tt-rss.conf ] ; then rm /etc/lighttpd/conf-enabled/50-tt-rss.conf fi } apache_remove() { if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then apache2_invoke disconf 50-tt-rss elif dpkg-query -f '${Version}' -W 'apache2.2-common' > /dev/null 2>&1 ; then if [ -L /etc/apache2/conf.d/50-tt-rss.conf ] ; then rm /etc/apache2/conf.d/50-tt-rss.conf fi fi } if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper fi if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then . /usr/share/dbconfig-common/dpkg/postrm dbc_go tt-rss $@ fi if [ "$1" = "purge" ]; then rm -rf /etc/tt-rss # Remove database configuration include file from ucf state # hashfile. Without this trying to reinstall the package # after a purge will not create the database configuration # include file. if which ucf >/dev/null; then ucf --purge /etc/tt-rss/database.php fi fi if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then if [ -f /usr/share/debconf/confmodule ]; then db_get tt-rss/reconfigure-webserver || true webservers="$RET" for webserver in $webservers; do rm -f /etc/avahi/services/tt-rss.service webserver=${webserver%,} if [ "$webserver" = "lighttpd" ]; then lighttpd_remove elif [ "$webserver" = "apache2" ]; then apache_remove fi # Redirection of 3 is needed because Debconf uses it and it might # be inherited by webserver. See bug #446324. if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d $webserver reload 3>/dev/null || true else /etc/init.d/$webserver reload 3>/dev/null || true fi done fi fi # Automatically added by dh_installinit/13.10.1 if [ "$1" = "remove" ] && [ -x "/etc/init.d/tt-rss" ] ; then chmod -x "/etc/init.d/tt-rss" >/dev/null || true fi if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then update-rc.d tt-rss remove >/dev/null fi # End automatically added section # Automatically added by dh_installsystemd/13.10.1 if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then systemctl --system daemon-reload >/dev/null || true fi # End automatically added section # Automatically added by dh_installsystemd/13.10.1 if [ "$1" = "purge" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper purge 'tt-rss.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installdebconf/13.10.1 if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge fi # End automatically added section exit 0