Files
docker-mods-uptime-kuma-tim…/root/etc/cont-init.d/98-flac2mp3
T
TheCaptain989 024b80026f Release 2.0
## Lots of new features and it still retains backward compatibility!

- Added batch mode per issue #28
- Added ALAC wrapper script per issue #28
- Bug fix for issue #29 introduced with release 1.3
- Added output and keep-file options per issue #30
- Moved option check earlier in the script and completely reworked options/arguments processing
- Added long option names
- Added debug info for system API
- Added debug info for config API
- Added multiple debug logging levels, defaults to lowest
  - Default debug level excludes the returned JSON, making it more readable and useful
- Normalized test event output
- Minor fix for error text
- Added version option
- Modified how script version is handled
   - Updated BuildImage.yml
   - Updated Dockerfile
   - Update 98-flac2mp3 init script
- Changed awk pattern match to be more robust
- Removed dedundant system command in awk script
- Updated help text
- Updated README.md
- Updated SECURITY.md
2022-05-07 11:26:42 -05:00

48 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