mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-18 22:33:00 -04:00
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
#!/usr/bin/with-contenv bash
|
|
|
|
cat <<EOF
|
|
----------------
|
|
>>> Striptracks Mod by TheCaptain989 <<<
|
|
Repos:
|
|
Dev/test: https://github.com/TheCaptain989/radarr-striptracks
|
|
Prod: https://github.com/linuxserver/docker-mods/tree/radarr-striptracks
|
|
|
|
Version: $(cat /etc/version.tc989)
|
|
----------------
|
|
EOF
|
|
|
|
# Determine if setup is needed
|
|
if [ ! -f /usr/bin/mkvmerge ]; then
|
|
echo "Running first time setup."
|
|
if [ -f /usr/bin/apt ]; then
|
|
# Ubuntu
|
|
echo "Installing MKVToolNix using apt-get"
|
|
apt-get -y install mkvtoolnix && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
elif [ -f /sbin/apk ]; then
|
|
# Alpine
|
|
echo "Installing MKVToolNix using apk"
|
|
apk add --no-cache mkvtoolnix && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
else
|
|
# Unknown
|
|
echo "Unknown package manager. Attempting to install MKVToolNix using apt-get"
|
|
apt-get -y install mkvtoolnix && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
fi
|
|
fi
|
|
|
|
# Change ownership
|
|
if [ $(stat -c '%G' /usr/local/bin/striptracks.sh) != "abc" ]; then
|
|
echo "Changing ownership on scripts."
|
|
chown abc:abc /usr/local/bin/striptracks*.sh
|
|
fi
|
|
|
|
# Make executable
|
|
if [ ! -x /usr/local/bin/striptracks.sh ]; then
|
|
echo "Making scripts executable."
|
|
chmod +x /usr/local/bin/striptracks*.sh
|
|
fi
|
|
|