From 29ef7eba5b1ff8a8d957a029ed4f738b584d36d7 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 13 Sep 2023 13:47:13 +0100 Subject: [PATCH] Add deprecation notice --- README.md | 2 ++ .../run | 24 ++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b14c131..fe9b5bb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # par2cmdline-turbo - SABnzbd mod +## par2cmdline-turbo is now included in the SABnzbd docker image and this mod has been deprecated + This mod adds the [par2cmdline-turbo](https://github.com/animetosho/par2cmdline-turbo) fork as a replacement for the standard par2cmdline package. It is supported on both amd64 and aarch64 (arm64) platforms, but not armhf (arm32). diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run index 943b3f5..a190c27 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash # This is an install script that is designed to run after init-mods-package-install # so it can take advantage of packages installed @@ -9,11 +10,22 @@ if apk list --installed -q | grep par2cmdline &> /dev/null; then apk del --purge -q par2cmdline fi -ARCH=$(uname -m) -if [[ -d "/par2cmdline-turbo/${ARCH}" ]]; then - echo "**** Installing par2cmdline-turbo ****" - cp -a /par2cmdline-turbo/${ARCH}/* / - rm -rf /par2cmdline-turbo +if [[ -e "/usr/local/bin/par2" ]] && grep -q 'par2cmdline-turbo' <<< "$(/usr/local/bin/par2 -V)"; then + echo "┌─────────────────────────────────────────────────────────────────────────────┐" + echo "│ │" + echo "| par2cmdline-turbo is now included in the SABnzbd │" + echo "| docker image and this mod has been deprecated. │" + echo "│ │" + echo "│ Please remove this mod from your setup as it will not be updated. |" + echo "│ │" + echo "└─────────────────────────────────────────────────────────────────────────────┘" else - echo "**** par2cmdline-turbo already installed or platform unsupported ****" + ARCH=$(uname -m) + if [[ -d "/par2cmdline-turbo/${ARCH}" ]]; then + echo "**** Installing par2cmdline-turbo ****" + cp -a /par2cmdline-turbo/${ARCH}/* / + rm -rf /par2cmdline-turbo + else + echo "**** par2cmdline-turbo already installed or platform unsupported ****" + fi fi