mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-02 06:28:34 -04:00
64b36034ee
- Switch to hybrid S6 - **Added --regex option** TheCaptain989/lidarr-flac2mp3#33 - **Added optional use of environment variable** TheCaptain989/lidarr-flac2mp3#33 - **Added new --tags option to resolve TheCaptain989/lidarr-flac2mp3#15** - Added checks for identical track name - Recycled files are now moved to subdirectory paths that more closely resemble the original path - Better error handling in awk script when calling system commands - Added logging for skipped tracks - Corrected some logging anomalies - Modified exit codes - Updated command line help - Fixed missing executable attribute on some script files - Updated README
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
#!/usr/bin/with-contenv bash
|
|
|
|
cat <<EOF
|
|
----------------
|
|
>>> Flac2MP3 Mod by TheCaptain989 <<<
|
|
Repos:
|
|
Dev/test: https://github.com/TheCaptain989/lidarr-flac2mp3
|
|
Prod: https://github.com/linuxserver/docker-mods/tree/lidarr-flac2mp3
|
|
|
|
Version: {{VERSION}}
|
|
----------------
|
|
EOF
|
|
|
|
# Determine if setup is needed
|
|
if [ ! -f /usr/bin/ffmpeg ]; then
|
|
echo "Running first time setup."
|
|
|
|
if [ -f /usr/bin/apt ]; then
|
|
# Ubuntu
|
|
echo "Installing ffmpeg using apt-get"
|
|
apt-get -y install ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
elif [ -f /sbin/apk ]; then
|
|
# Alpine
|
|
echo "Installing ffmpeg using apk"
|
|
apk add --no-cache ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
else
|
|
# Unknown
|
|
echo "Unknown package manager. Attempting to install ffmpeg using apt-get"
|
|
apt-get -y install ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
fi
|
|
fi
|
|
|
|
# Change ownership
|
|
if [ $(stat -c '%G' /usr/local/bin/flac2mp3.sh) != "abc" ]; then
|
|
echo "Changing ownership on scripts."
|
|
chown abc:abc /usr/local/bin/flac2*.sh
|
|
fi
|
|
|
|
# Make executable
|
|
if [ ! -x /usr/local/bin/flac2mp3.sh ]; then
|
|
echo "Making scripts executable."
|
|
chmod +x /usr/local/bin/flac2*.sh
|
|
fi
|