Compatibility with Synology DSM7

This commit is contained in:
Geoff Appleby 2021-08-06 14:17:09 -07:00
commit 388ff66589
2 changed files with 17 additions and 8 deletions

View file

@ -228,7 +228,7 @@ isNewerVersion() {
parseVersion() {
if [ "${DISTRO}" = "redhat" ]; then
cut -f2- -d- <<< "$1" | cut -f1-4 -d.
elif [ "${DISTRO}" = "synology" ]; then
elif [ "${DISTRO}" = "synology" -o "${DISTRO}" = "synology-dsm7" ]; then
cut -f2-3 -d- <<< "$1"
else
cut -f2 -d_ <<< "$1"
@ -240,6 +240,8 @@ getPlexVersion() {
dpkg-query --showformat='${Version}' --show plexmediaserver 2>/dev/null
elif [ "${DISTRO}" = "synology" ]; then
synopkg version "Plex Media Server" 2>/dev/null
elif [ "${DISTRO}" = "synology-dsm7" ]; then
synopkg version "PlexMediaServer" 2>/dev/null
elif [ "${DISTRO}" = "redhat" ]; then
local rpmtemp
if rpmtemp=$(rpm -q plexmediaserver); then