mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-20 10:21:36 -04:00
32 lines
1.9 KiB
Plaintext
Executable File
32 lines
1.9 KiB
Plaintext
Executable File
#!/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
|
|
# init-mods-end depends on this script so that later init and services wait until this script exits
|
|
|
|
echo "*** Removing existing par2cmdline packages ***"
|
|
if apk list --installed -q | grep par2cmdline &> /dev/null; then
|
|
apk del --purge -q par2cmdline
|
|
fi
|
|
|
|
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
|
|
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
|