]> git.wh0rd.org - tt-rss.git/blame - debian/tt-rss-mysql.postrm
experimental split of public calls into public.php (refs #389)
[tt-rss.git] / debian / tt-rss-mysql.postrm
CommitLineData
d0cafcf4
AD
1#!/bin/sh
2set -e
3
4PACKAGE=tt-rss-mysql
5
6# source debconf stuff
7if [ -f /usr/share/debconf/confmodule ]; then
8 . /usr/share/debconf/confmodule
9fi
10
11# Un-configure and restart webservers
12db_get $PACKAGE/webserver || true
13WEBSERVER="$RET";
14if $WEBSERVER; then
15 if [ -L /etc/apache2/conf.d/$PACKAGE.conf ]; then
16 rm -f /etc/apache2/conf.d/$PACKAGE.conf
17 fi
18fi
19
20if apache2ctl configtest 2>/dev/null; then
21 invoke-rc.d apache2 force-reload || true
22else
23 echo "apache need to be manually reloaded"
24fi
25
26# dbconfig-common
27if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
28 . /usr/share/dbconfig-common/dpkg/postrm.mysql
29 dbc_go $PACKAGE $@
30fi
31
32if [ "$1" = "purge" ]; then
33 # remove database config
34 rm -f /etc/$PACKAGE/database.php
35 if which ucf >/dev/null 2>&1; then
36 ucf --purge /etc/$PACKAGE/database.php
37 fi
38 db_purge
39fi
40
41exit 0
42#DEBHELPER#