Skip to content

Commit

Permalink
Sonarr: patch for DSM6 configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mreid-tt committed Jan 6, 2023
1 parent 0d9c7eb commit d7a5ae9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spk/sonarr/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ LEGACY_SPK_NAME="nzbdrone"
LEGACY_SYNOPKG_PKGDEST="/var/packages/${LEGACY_SPK_NAME}/target"
LEGACY_SYNOPKG_PKGVAR="/var/packages/${LEGACY_SPK_NAME}/var"
LEGACY_CONFIG_DIR="${LEGACY_SYNOPKG_PKGVAR}/.config"
# Some DSM6 installs have it stored in the package storage
LEGACY_DSM6_CONFIG_DIR="${LEGACY_SYNOPKG_PKGDEST}/var/.config"
# Some have it stored in the root of package
LEGACY_OLD_CONFIG_DIR="${LEGACY_SYNOPKG_PKGDEST}/.config"

Expand Down Expand Up @@ -41,6 +43,9 @@ service_postinst ()
if [ -d "${LEGACY_CONFIG_DIR}/Sonarr" ]; then
echo "Migrate ${LEGACY_CONFIG_DIR}/Sonarr to ${CONFIG_DIR}"
rsync -aX "${LEGACY_CONFIG_DIR}/Sonarr" "${CONFIG_DIR}" 2>&1
elif [ -d "${LEGACY_DSM6_CONFIG_DIR}/Sonarr" ]; then
echo "Migrate ${LEGACY_DSM6_CONFIG_DIR}/Sonarr to ${CONFIG_DIR}"
rsync -aX "${LEGACY_DSM6_CONFIG_DIR}/Sonarr" "${CONFIG_DIR}" 2>&1
elif [ -d "${LEGACY_OLD_CONFIG_DIR}/Sonarr" ]; then
echo "Migrate ${LEGACY_OLD_CONFIG_DIR}/Sonarr to ${CONFIG_DIR}"
rsync -aX "${LEGACY_OLD_CONFIG_DIR}/Sonarr" "${CONFIG_DIR}" 2>&1
Expand Down

0 comments on commit d7a5ae9

Please sign in to comment.