Skip to content

Commit 4037768

Browse files
authored
Update script version to v1.3.10 and modify version retrieval
1 parent 6b82f02 commit 4037768

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

Linux_Plex_Backup.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# shellcheck disable=SC2317,SC2181,SC2009,SC2129,SC2163
33
#--------------------------------------------------------------------------
44
# Backup Linux Plex Database to tgz file in Backup folder.
5-
# v1.3.9 31-Aug-2025 007revad
5+
# v1.3.10 3-Sep-2025 007revad
66
#
77
# MUST be run by a user in sudo, sudoers or wheel group, or as root
88
#
@@ -24,7 +24,7 @@
2424
# https://arnaudr.io/2020/08/24/send-emails-from-your-terminal-with-msmtp/
2525
#--------------------------------------------------------------------------
2626

27-
scriptver="v1.3.9"
27+
scriptver="v1.3.10"
2828
script=Linux_Plex_Backup
2929

3030

@@ -283,11 +283,20 @@ fi
283283
#--------------------------------------------------------------------------
284284
# Get Plex Media Server version
285285

286-
Version="$(/usr/lib/plexmediaserver/Plex\ Media\ Server --version)"
287-
# Returns v1.29.2.6364-6d72b0cf6
288-
# Plex version without v or hex string
289-
Version=$(printf %s "${Version:1}"| cut -d "-" -f1)
290-
# Returns 1.29.2.6364
286+
if [[ ${snap,,} == "yes" ]]; then
287+
#Version="$(/usr/snap/plexmediaserver/Plex\ Media\ Server --version)"
288+
Version="$(snap list plexmediaserver | head -n 2 | tail -n 1 | awk '{print $2}')"
289+
# Returns 1.29.2.6364-6d72b0cf6
290+
# Plex version without hex string
291+
Version=$(printf %s "$Version"| cut -d "-" -f1)
292+
# Returns 1.29.2.6364
293+
else
294+
Version="$(/usr/lib/plexmediaserver/Plex\ Media\ Server --version)"
295+
# Returns v1.29.2.6364-6d72b0cf6
296+
# Plex version without v or hex string
297+
Version=$(printf %s "${Version:1}"| cut -d "-" -f1)
298+
# Returns 1.29.2.6364
299+
fi
291300

292301

293302
#--------------------------------------------------------------------------

0 commit comments

Comments
 (0)