diff options
Diffstat (limited to 'debian/taler-merchant.postrm')
-rw-r--r-- | debian/taler-merchant.postrm | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/debian/taler-merchant.postrm b/debian/taler-merchant.postrm index a39e64b9..bf628b36 100644 --- a/debian/taler-merchant.postrm +++ b/debian/taler-merchant.postrm @@ -2,33 +2,6 @@ set -e -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} - -apache_remove() { - if [ diff /etc/taler-merchant/apache.conf /etc/apache2/conf-available/taler-merchant.conf >/dev/null 2>&1 ]; - then - rm -f /etc/apache2/conf-available/taler-merchant.conf - fi -} - -nginx_remove() { - if [ diff /etc/taler-exchange/nginx.conf /etc/apache2/conf-available/taler-exchange.conf >/dev/null 2>&1 ]; - then - rm -f /etc/nginx/conf-available/taler-merchant.conf - fi -} - if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi @@ -38,62 +11,6 @@ if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then dbc_go taler-merchant "$@" fi - -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_version 2.0 - db_get taler-merchant/reconfigure-webserver - webservers="$RET" - for webserver in $webservers; do - webserver=${webserver%,} - if [ "$webserver" = "nginx" ] ; then - nginx_remove - else - apache_remove - fi - done - fi -fi - -case "${1}" in - purge) - rm -f /var/lib/taler-merchant/master-api-key.txt - rm -rf /var/lib/taler-merchant/httpd/ - if [ -e /usr/share/debconf/confmodule ] - then - . /usr/share/debconf/confmodule - db_version 2.0 - - db_get taler-merchant/username - _USERNAME="${RET:-taler-merchant-httpd}" - - db_get taler-merchant/groupname - _GROUPNAME="${RET:-taler-merchant-httpd}" - else - _USERNAME="taler-merchant-httpd" - _GROUPNAME="taler-merchant-httpd" - fi - - if pathfind deluser - then - deluser --quiet --system ${_USERNAME} || true - fi - - if pathfind delgroup - then - delgroup --quiet --system --only-if-empty ${_GROUPNAME} || true - fi - ;; - remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - #DEBHELPER# exit 0 |