Skip to content

Commit 8ece0e3

Browse files
authored
Jellyfin: ensure libjemalloc is used / increase hdd space (#8494)
* Jellyfin: ensure libjemalloc used * Enhance Jellyfin update script with libjemalloc checks Added checks for libjemalloc2 installation and symlink creation before updating Jellyfin. * Change apt-get to apt for installing libjemalloc2 * Increase default disk size from 8GB to 16GB * Increase HDD size for Jellyfin configuration Updated HDD size from 8GB to 16GB in jellyfin.json.
1 parent b34a449 commit 8ece0e3

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

ct/jellyfin.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ APP="Jellyfin"
99
var_tags="${var_tags:-media}"
1010
var_cpu="${var_cpu:-2}"
1111
var_ram="${var_ram:-2048}"
12-
var_disk="${var_disk:-8}"
12+
var_disk="${var_disk:-16}"
1313
var_os="${var_os:-ubuntu}"
1414
var_version="${var_version:-24.04}"
1515
var_unprivileged="${var_unprivileged:-1}"
@@ -27,11 +27,18 @@ function update_script() {
2727
msg_error "No ${APP} Installation Found!"
2828
exit
2929
fi
30-
msg_info "Updating ${APP} LXC"
31-
$STD apt-get update
32-
$STD apt-get -y upgrade
33-
$STD apt-get -y --with-new-pkgs upgrade jellyfin jellyfin-server
34-
msg_ok "Updated ${APP} LXC"
30+
msg_info "Updating Jellyfin"
31+
if ! dpkg -s libjemalloc2 >/dev/null 2>&1; then
32+
$STD apt install -y libjemalloc2
33+
fi
34+
if [[ ! -f /usr/lib/libjemalloc.so ]]; then
35+
ln -sf /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so
36+
fi
37+
$STD apt update
38+
$STD apt -y upgrade
39+
$STD apt -y --with-new-pkgs upgrade jellyfin jellyfin-server
40+
msg_ok "Updated Jellyfin"
41+
msg_ok "Update Successfully!"
3542
exit
3643
}
3744

frontend/public/json/jellyfin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"resources": {
2222
"cpu": 2,
2323
"ram": 2048,
24-
"hdd": 8,
24+
"hdd": 16,
2525
"os": "ubuntu",
2626
"version": "24.04"
2727
}

install/jellyfin-install.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ msg_ok "Set Up Hardware Acceleration"
2626

2727
msg_info "Installing Jellyfin"
2828
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
29-
# If the keyring directory is absent, create it
29+
if ! dpkg -s libjemalloc2 >/dev/null 2>&1; then
30+
$STD apt install -y libjemalloc2
31+
fi
32+
if [[ ! -f /usr/lib/libjemalloc.so ]]; then
33+
ln -sf /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so
34+
fi
3035
if [[ ! -d /etc/apt/keyrings ]]; then
3136
mkdir -p /etc/apt/keyrings
3237
fi
33-
# Download the repository signing key and install it to the keyring directory
3438
curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --yes --output /etc/apt/keyrings/jellyfin.gpg
35-
# Install the Deb822 format jellyfin.sources entry
3639
cat <<EOF >/etc/apt/sources.list.d/jellyfin.sources
3740
Types: deb
3841
URIs: https://repo.jellyfin.org/${PCT_OSTYPE}
@@ -41,10 +44,11 @@ Components: main
4144
Architectures: amd64
4245
Signed-By: /etc/apt/keyrings/jellyfin.gpg
4346
EOF
44-
# Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5)
45-
$STD apt-get update
46-
$STD apt-get install -y jellyfin
47+
48+
$STD apt update
49+
$STD apt install -y jellyfin
4750
sed -i 's/"MinimumLevel": "Information"/"MinimumLevel": "Error"/g' /etc/jellyfin/logging.json
51+
4852
chown -R jellyfin:adm /etc/jellyfin
4953
sleep 10
5054
systemctl restart jellyfin
@@ -59,6 +63,7 @@ motd_ssh
5963
customize
6064

6165
msg_info "Cleaning up"
62-
$STD apt-get -y autoremove
63-
$STD apt-get -y autoclean
66+
$STD apt -y autoremove
67+
$STD apt -y autoclean
68+
$STD apt -y clean
6469
msg_ok "Cleaned"

0 commit comments

Comments
 (0)