@@ -32,7 +32,7 @@ service_postinst ()
32
32
mv ${SYNOPKG_PKGDEST} /app/config.xml ${CONFIG_DIR} /Radarr/config.xml
33
33
set_unix_permissions " ${CONFIG_DIR} "
34
34
35
- # If nessecary , add user also to the old group before removing it
35
+ # If necessary , add user also to the old group before removing it
36
36
syno_user_add_to_legacy_group " ${EFF_USER} " " ${USER} " " ${LEGACY_GROUP} "
37
37
syno_user_add_to_legacy_group " ${EFF_USER} " " ${USER} " " users"
38
38
@@ -61,7 +61,8 @@ service_preupgrade ()
61
61
echo " Installed Radarr Binary: ${CUR_VER} " >> ${INST_LOG}
62
62
SPK_VER=$( ${MONO_PATH} /monodis --assembly ${SPK_RADARR} | grep " Version:" | awk ' {print $2}' )
63
63
echo " Requested Radarr Binary: ${SPK_VER} " >> ${INST_LOG}
64
- if [ " ${CUR_VER// .} " -ge " ${SPK_VER// .} " ]; then
64
+ function version_compare() { test " $( printf ' %s\n' " $@ " | sort -V | head -n 1) " ! = " $1 " ; }
65
+ if version_compare $CUR_VER $SPK_VER ; then
65
66
echo ' KEEP_CUR="yes"' > ${CONFIG_DIR} /KEEP_VAR
66
67
echo " [KEEPING] Installed Radarr Binary - Upgrading Package Only" >> ${INST_LOG}
67
68
mv ${SYNOPKG_PKGDEST} /share ${INST_VAR}
@@ -81,6 +82,7 @@ service_postupgrade ()
81
82
mv ${INST_VAR} /share ${SYNOPKG_PKGDEST} / >> $INST_LOG 2>&1
82
83
set_unix_permissions " ${SYNOPKG_PKGDEST} /share"
83
84
fi
85
+
84
86
set_unix_permissions " ${CONFIG_DIR} "
85
87
86
88
# If backup was created before new-style packages
0 commit comments