Update version check for Synology 7.2+

This commit is contained in:
Geoff 2024-11-05 00:37:21 -08:00 committed by GitHub
commit 1da06d8312
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -230,7 +230,7 @@ parseVersion() {
cut -f2- -d- <<< "$1" | cut -f1-4 -d. cut -f2- -d- <<< "$1" | cut -f1-4 -d.
elif [ "${DISTRO}" = "synology" ]; then elif [ "${DISTRO}" = "synology" ]; then
cut -f2-3 -d- <<< "$1" cut -f2-3 -d- <<< "$1"
elif [ "${DISTRO}" = "synology-dsm7" ]; then elif [ $(echo "${DISTRO}" | cut -c -13) = "synology-dsm7" ]; then
cut -f2 -d- <<< "$1" cut -f2 -d- <<< "$1"
else else
cut -f2 -d_ <<< "$1" cut -f2 -d_ <<< "$1"
@ -242,7 +242,7 @@ getPlexVersion() {
dpkg-query --showformat='${Version}' --show plexmediaserver 2>/dev/null dpkg-query --showformat='${Version}' --show plexmediaserver 2>/dev/null
elif [ "${DISTRO}" = "synology" ]; then elif [ "${DISTRO}" = "synology" ]; then
synopkg version "Plex Media Server" 2>/dev/null synopkg version "Plex Media Server" 2>/dev/null
elif [ "${DISTRO}" = "synology-dsm7" ]; then elif [ $(echo "${DISTRO}" | cut -c -13) = "synology-dsm7" ]; then
synopkg version "PlexMediaServer" 2>/dev/null | cut -f1 -d- synopkg version "PlexMediaServer" 2>/dev/null | cut -f1 -d-
elif [ "${DISTRO}" = "redhat" ]; then elif [ "${DISTRO}" = "redhat" ]; then
local rpmtemp local rpmtemp