mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
27 lines
640 B
Bash
27 lines
640 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
|
|
|
|
# The bin directory is expected to be empty, unless the BuiltIn updater added files.
|
|
if [ $1 = "remove" ] && [ -d /usr/lib/sonarr/bin ]; then
|
|
rm -rf /usr/lib/sonarr/bin
|
|
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#
|