blob: 85e43a28355f85b6644d601cb6c5c2412fd8abde (
plain)
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
|
#!/bin/sh
set -e
PACKAGE=tt-rss-pgsql
# source debconf stuff
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
# Un-configure and restart webservers
db_get $PACKAGE/webserver || true
WEBSERVER="$RET";
if $WEBSERVER; then
if [ -L /etc/apache2/conf.d/$PACKAGE.conf ]; then
rm -f /etc/apache2/conf.d/$PACKAGE.conf
fi
fi
if apache2ctl configtest 2>/dev/null; then
invoke-rc.d apache2 force-reload || true
else
echo "apache need to be manually reloaded"
fi
# dbconfig-common
if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then
. /usr/share/dbconfig-common/dpkg/postrm.pgsql
dbc_go $PACKAGE $@
fi
if [ "$1" = "purge" ]; then
# remove database config
rm -f /etc/$PACKAGE/database.php
if which ucf >/dev/null 2>&1; then
ucf --purge /etc/$PACKAGE/database.php
fi
db_purge
fi
exit 0
#DEBHELPER#
|