lidarr-flac2mp3 update/add workflows

- Updated to match PR linuxserver/docker-mods#664
This commit is contained in:
TheCaptain989
2023-05-20 21:17:53 -05:00
parent a62debcf23
commit 3149b2c3ea
7 changed files with 75 additions and 114 deletions
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/with-contenv bash
if [ -f /usr/bin/apt ]; then
apt-get update
fi
-46
View File
@@ -1,46 +0,0 @@
#!/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
@@ -25,7 +25,7 @@ do
# Change ownership
if [ $(stat -c '%G' $file) != "abc" ]; then
echo "Changing ownership on $file script."
chown abc:abc $file
lsiown abc:abc $file
fi
# Make executable