Improve layout and add cache bust to ldconfig

This commit is contained in:
Joshua M. Boniface
2025-10-23 18:01:02 -04:00
parent a928d4ca6a
commit 71d451ebb9

View File

@@ -50,12 +50,14 @@ case "$1" in
fi
done
# Install libjemalloc.so symlink into /usr/lib/jellyfin
# Refresh ldconfig cache and get libjemalloc.so path
ldconfig &>/dev/null
LIBJEMALLOC_PATH="$( ldconfig -p | grep libjemalloc | awk '{print $NF}' | head -n1 )"
if [[ -z ${LIBJEMALLOC_PATH} ]]; then
# Try to find the path with `find` instead of `ldconfig`; hackier, but a good fallback
LIBJEMALLOC_PATH="$( find /usr/lib -type f -name "libjemalloc.so*" | head -n1 )"
fi
# Install libjemalloc.so symlink into /usr/lib/jellyfin
if [[ -n ${LIBJEMALLOC_PATH} && -f ${LIBJEMALLOC_PATH} ]]; then
ln -sf ${LIBJEMALLOC_PATH} /usr/lib/jellyfin/libjemalloc.so
else