fix exchange postinst
This commit is contained in:
parent
502c2aef96
commit
d981da056e
29
debian/taler-exchange.postrm
vendored
29
debian/taler-exchange.postrm
vendored
@ -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
|
||||||
|
5
debian/taler-exchange.prerm
vendored
5
debian/taler-exchange.prerm
vendored
@ -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
|
Loading…
Reference in New Issue
Block a user