Update mm-scripts.sh

This commit is contained in:
2023-03-25 14:47:30 -05:00
parent ca9fa05da3
commit 3079a50608

View File

@@ -632,13 +632,13 @@ UPDATESERVICE(){
if curl --output /dev/null --silent --head --fail $latest_release_url; then
wget -qO ${tmpfile} $latest_release_url >> ${MMFOLDER}/logs/${usrvc}.update
if [[ ( $? -eq 0 ) && ( -f ${tmpfile} ) ]]; then
rm -Rf /opt/${usrvc^} >> ${MMFOLDER}/logs/${usrvc}.update
[ "${usrvc}" != "bazarr" ] && rm -Rf /opt/${usrvc^} >> ${MMFOLDER}/logs/${usrvc}.update
mkdir /opt/${usrvc^} >> ${MMFOLDER}/logs/${usrvc}.update
/bin/tar czpfP $bak /opt/${usrvc^} >> ${MMFOLDER}/logs/${usrvc}.update
if [ "${usrvc}" == "ombi" ]; then
/bin/tar xfP ${tmpfile} -C /opt/${usrvc^} >> ${MMFOLDER}/logs/${usrvc}.update
elif [ "${usrvc}" == "bazarr" ]; then
/usr/bin/unzip -qq ${tmpfile} -d /opt/${usrvc^}
/usr/bin/unzip -oqq ${tmpfile} -d /opt/${usrvc^}
else
/bin/tar xfP ${tmpfile} -C /opt >> ${MMFOLDER}/logs/${usrvc}.update
fi