Sonarr/distribution/debian/postrm

22 lines
465 B
Bash

#!/bin/sh
set -e
if [ "$1" = "abort-install" ]; then
# preinst was aborted, possibly due to NzbDrone still running.
# Nothing to do here
:
fi
# Purge the entire sonarr configuration directory.
# TODO: Maybe move a minimal backup to tmp?
if [ "$1" = "purge" ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_get sonarr/config_directory
CONFDIR="$RET"
if [ -d "$CONFDIR" ]; then
rm -rf "$CONFDIR"
fi
fi
#DEBHELPER#