mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-20 02:13:07 -04:00
Use mod package install logic to avoid apt locks
This commit is contained in:
@@ -34,18 +34,17 @@ fi
|
|||||||
# Install pacakges and fonts
|
# Install pacakges and fonts
|
||||||
if [[ "${LSIO_BASE}" == "alpine" ]] && [[ ! -f /usr/share/fonts/noto/NotoSansCJK-Regular.ttc ]]; then
|
if [[ "${LSIO_BASE}" == "alpine" ]] && [[ ! -f /usr/share/fonts/noto/NotoSansCJK-Regular.ttc ]]; then
|
||||||
# Add fonts and lang
|
# Add fonts and lang
|
||||||
apk add --no-cache \
|
echo "\
|
||||||
font-noto-all \
|
font-noto-all \
|
||||||
font-noto-cjk \
|
font-noto-cjk \
|
||||||
font-noto-emoji \
|
font-noto-emoji \
|
||||||
lang
|
lang" >> /mod-repo-packages-to-install.list
|
||||||
elif [[ "${LSIO_BASE}" == "ubuntu" ]] && [[ ! -f /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc ]]; then
|
elif [[ "${LSIO_BASE}" == "ubuntu" ]] && [[ ! -f /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc ]]; then
|
||||||
# Install fonts and locales
|
# Install fonts and locales
|
||||||
sed -i \
|
sed -i \
|
||||||
'/locale/d' \
|
'/locale/d' \
|
||||||
/etc/dpkg/dpkg.cfg.d/excludes
|
/etc/dpkg/dpkg.cfg.d/excludes
|
||||||
apt-get update
|
echo "\
|
||||||
apt-get install -y \
|
|
||||||
fonts-noto \
|
fonts-noto \
|
||||||
language-pack-af \
|
language-pack-af \
|
||||||
language-pack-am \
|
language-pack-am \
|
||||||
@@ -130,25 +129,24 @@ elif [[ "${LSIO_BASE}" == "ubuntu" ]] && [[ ! -f /usr/share/fonts/opentype/noto/
|
|||||||
language-pack-vi \
|
language-pack-vi \
|
||||||
language-pack-xh \
|
language-pack-xh \
|
||||||
language-pack-zh-hans \
|
language-pack-zh-hans \
|
||||||
language-pack-zh-hant
|
language-pack-zh-hant" >> /mod-repo-packages-to-install.list
|
||||||
elif [[ "${LSIO_BASE}" == "debian" ]] && [[ ! -f /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc ]]; then
|
elif [[ "${LSIO_BASE}" == "debian" ]] && [[ ! -f /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc ]]; then
|
||||||
# Install fonts and locales
|
# Install fonts and locales
|
||||||
sed -i \
|
sed -i \
|
||||||
'/locale/d' \
|
'/locale/d' \
|
||||||
/etc/dpkg/dpkg.cfg.d/docker
|
/etc/dpkg/dpkg.cfg.d/docker
|
||||||
apt-get update
|
echo "\
|
||||||
apt-get install -y \
|
|
||||||
fonts-noto \
|
fonts-noto \
|
||||||
locales-all
|
locales-all" >> /mod-repo-packages-to-install.list
|
||||||
# Generate locales
|
# Generate locales
|
||||||
for LOCALE in ${LOCALES}; do
|
for LOCALE in ${LOCALES}; do
|
||||||
echo "Generating Locale for ${LOCALE}"
|
echo "Generating Locale for ${LOCALE}"
|
||||||
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}.UTF-8
|
localedef -i "${LOCALE}" -f UTF-8 "${LOCALE}.UTF-8"
|
||||||
done
|
done
|
||||||
elif [[ "${LSIO_BASE}" == "fedora" ]] && [[ ! -d /usr/share/licenses/google-noto-cjk-fonts-common ]]; then
|
elif [[ "${LSIO_BASE}" == "fedora" ]] && [[ ! -d /usr/share/licenses/google-noto-cjk-fonts-common ]]; then
|
||||||
# Install fonts and locales
|
# Install fonts and locales
|
||||||
rm -f /etc/rpm/macros.image-language-conf
|
rm -f /etc/rpm/macros.image-language-conf
|
||||||
dnf install -y \
|
echo "\
|
||||||
glibc-langpack-aa \
|
glibc-langpack-aa \
|
||||||
glibc-langpack-af \
|
glibc-langpack-af \
|
||||||
glibc-langpack-agr \
|
glibc-langpack-agr \
|
||||||
@@ -715,26 +713,26 @@ elif [[ "${LSIO_BASE}" == "fedora" ]] && [[ ! -d /usr/share/licenses/google-noto
|
|||||||
google-noto-serif-vithkuqi-vf-fonts \
|
google-noto-serif-vithkuqi-vf-fonts \
|
||||||
google-noto-serif-yezidi-fonts \
|
google-noto-serif-yezidi-fonts \
|
||||||
google-noto-serif-yezidi-vf-fonts \
|
google-noto-serif-yezidi-vf-fonts \
|
||||||
google-noto-traditional-nushu-fonts
|
google-noto-traditional-nushu-fonts" >> /mod-repo-packages-to-install.list
|
||||||
# Generate locales
|
# Generate locales
|
||||||
for LOCALE in ${LOCALES}; do
|
for LOCALE in ${LOCALES}; do
|
||||||
echo "Generating Locale for ${LOCALE}"
|
echo "Generating Locale for ${LOCALE}"
|
||||||
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}.UTF-8
|
localedef -i "${LOCALE}" -f UTF-8 "${LOCALE}.UTF-8"
|
||||||
done
|
done
|
||||||
elif [[ "${LSIO_BASE}" == "arch" ]] && [[ ! -f /usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc ]]; then
|
elif [[ "${LSIO_BASE}" == "arch" ]] && [[ ! -f /usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc ]]; then
|
||||||
# Install fonts
|
# Install fonts
|
||||||
sed -i \
|
sed -i \
|
||||||
'/locale/d' \
|
'/locale/d' \
|
||||||
/etc/pacman.conf
|
/etc/pacman.conf
|
||||||
pacman -Sy --noconfirm \
|
echo "\
|
||||||
glibc \
|
glibc \
|
||||||
noto-fonts-cjk \
|
noto-fonts-cjk \
|
||||||
noto-fonts-emoji \
|
noto-fonts-emoji \
|
||||||
noto-fonts-extra
|
noto-fonts-extra" >> /mod-repo-packages-to-install.list
|
||||||
# Generate locales
|
# Generate locales
|
||||||
for LOCALE in ${LOCALES}; do
|
for LOCALE in ${LOCALES}; do
|
||||||
echo "Generating Locale for ${LOCALE}"
|
echo "Generating Locale for ${LOCALE}"
|
||||||
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}.UTF-8
|
localedef -i "${LOCALE}" -f UTF-8 "${LOCALE}.UTF-8"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "**** International Fonts/Locales installed skipping ****"
|
echo "**** International Fonts/Locales installed skipping ****"
|
||||||
@@ -745,10 +743,10 @@ if which firefox && [ ! -f /langlock ]; then
|
|||||||
echo "Installing firefox langpacks"
|
echo "Installing firefox langpacks"
|
||||||
FIREFOX_VERSION=$(curl -sI https://download.mozilla.org/?product=firefox-latest | awk -F '(releases/|/win32)' '/Location/ {print $2}')
|
FIREFOX_VERSION=$(curl -sI https://download.mozilla.org/?product=firefox-latest | awk -F '(releases/|/win32)' '/Location/ {print $2}')
|
||||||
RELEASE_URL="https://releases.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/win64/xpi/"
|
RELEASE_URL="https://releases.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/win64/xpi/"
|
||||||
LANGS=$(curl -Ls ${RELEASE_URL} | awk -F '(xpi">|</a>)' '/href.*xpi/ {print $2}' | tr '\n' ' ')
|
LANGS=$(curl -Ls "${RELEASE_URL}" | awk -F '(xpi">|</a>)' '/href.*xpi/ {print $2}' | tr '\n' ' ')
|
||||||
if [[ "${LSIO_BASE}" == "alpine" ]]; then
|
if [[ "${LSIO_BASE}" == "alpine" ]]; then
|
||||||
EXTENSION_DIR=/usr/lib/firefox/distribution/extensions/
|
EXTENSION_DIR=/usr/lib/firefox/distribution/extensions/
|
||||||
else
|
else
|
||||||
EXTENSION_DIR=/usr/lib/firefox-addons/distribution/extensions/
|
EXTENSION_DIR=/usr/lib/firefox-addons/distribution/extensions/
|
||||||
fi
|
fi
|
||||||
mkdir -p ${EXTENSION_DIR}
|
mkdir -p ${EXTENSION_DIR}
|
||||||
@@ -756,8 +754,8 @@ if which firefox && [ ! -f /langlock ]; then
|
|||||||
LANGCODE=$(echo ${LANG} | sed 's/\.xpi//g')
|
LANGCODE=$(echo ${LANG} | sed 's/\.xpi//g')
|
||||||
echo "Downloading ${LANG} Firefox Language pack"
|
echo "Downloading ${LANG} Firefox Language pack"
|
||||||
curl -o \
|
curl -o \
|
||||||
${EXTENSION_DIR}langpack-${LANGCODE}@firefox.mozilla.org.xpi -Ls \
|
"${EXTENSION_DIR}langpack-${LANGCODE}@firefox.mozilla.org.xpi" -Ls \
|
||||||
${RELEASE_URL}${LANG}
|
"${RELEASE_URL}${LANG}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user