1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-22 07:43:01 +00:00

Purge should use the data folder as specified by debconf

This commit is contained in:
Taloth Saldono 2018-11-17 10:42:38 +01:00
parent e2ccb4c049
commit 241c26e099

View file

@ -9,9 +9,12 @@ fi
# Purge the entire sonarr configuration directory.
# TODO: Maybe move a minimal backup to tmp?
if [ "$1" = "purge" ]; then
if [ -d "/var/opt/sonarr" ]; then
rm -rf /var/opt/sonarr
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