fix exchange postinst

This commit is contained in:
Christian Grothoff 2021-01-03 23:14:26 +01:00
parent 502c2aef96
commit d981da056e
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 3 additions and 33 deletions

View File

@ -15,40 +15,11 @@ pathfind() {
return 1 return 1
} }
apache_remove() {
if [ diff /etc/taler-exchange/apache.conf /etc/apache2/conf-available/taler-exchange.conf >/dev/null 2>&1 ];
then
rm -f /etc/apache2/conf-available/taler-exchange.conf
fi
}
nginx_remove() {
if [ diff /etc/taler-exchange/nginx.conf /etc/nginx/conf-available/taler-exchange.conf >/dev/null 2>&1 ];
then
rm -f /etc/nginx/conf-available/taler-exchange.conf
fi
}
if [ -f /usr/share/debconf/confmodule ]; if [ -f /usr/share/debconf/confmodule ];
then then
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
fi fi
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
db_version 2.0
db_get taler-exchange/reconfigure-webserver
webservers="$RET"
for webserver in $webservers; do
webserver=${webserver%,}
if [ "$webserver" = "nginx" ] ; then
nginx_remove
else
apache_remove
fi
done
fi
case "${1}" in case "${1}" in
purge) purge)
db_version 2.0 db_version 2.0

View File

@ -2,11 +2,10 @@
set -e set -e
if [ -f /usr/share/debconf/confmodule ];
if [ -f /usr/share/debconf/confmodule ]; then then
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
fi fi
. /usr/share/dbconfig-common/dpkg/prerm
db_stop db_stop
exit 0 exit 0