]>
Commit | Line | Data |
---|---|---|
d0cafcf4 AD |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | PACKAGE=tt-rss-pgsql | |
5 | ||
6 | # source debconf stuff | |
7 | if [ -f /usr/share/debconf/confmodule ]; then | |
8 | . /usr/share/debconf/confmodule | |
9 | fi | |
10 | ||
11 | # Un-configure and restart webservers | |
12 | db_get $PACKAGE/webserver || true | |
13 | WEBSERVER="$RET"; | |
14 | if $WEBSERVER; then | |
15 | if [ -L /etc/apache2/conf.d/$PACKAGE.conf ]; then | |
16 | rm -f /etc/apache2/conf.d/$PACKAGE.conf | |
17 | fi | |
18 | fi | |
19 | ||
20 | if apache2ctl configtest 2>/dev/null; then | |
21 | invoke-rc.d apache2 force-reload || true | |
22 | else | |
23 | echo "apache need to be manually reloaded" | |
24 | fi | |
25 | ||
26 | # dbconfig-common | |
27 | if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then | |
28 | . /usr/share/dbconfig-common/dpkg/postrm.pgsql | |
29 | dbc_go $PACKAGE $@ | |
30 | fi | |
31 | ||
32 | if [ "$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 | |
39 | fi | |
40 | ||
41 | exit 0 | |
42 | #DEBHELPER# |