This commit is contained in:
2023-04-29 16:47:30 -05:00
parent a95f7e1d66
commit 1cc2c1e68d
2 changed files with 15 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ VERS='3.8.148-04232023'
MMFOLDER="/opt/idssys/mediamanager"
MMSRV=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
UPDATESERVICES=bazarr,jackett,lidarr,ombi,radarr,sonarr
UPDATESERVICES=bazarr,jackett,lidarr,ombi,organizr,radarr,sonarr
BETA_SERVICES=" "
IFS=,

View File

@@ -818,16 +818,21 @@ UPDATESERVICE(){
msg="Updating Organizr"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
cd /var/www/media.scity.us/html >/dev/null 2>&1
/usr/bin/git stash >/dev/null 2>&1
/usr/bin/git pull >/dev/null 2>&1
/bin/chown -Rf www-data:www-data /var/www/media.scity.us/html
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
msg="Restarting NGINX"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
/bin/systemctl restart nginx >/dev/null 2>&1
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
if [ "`git log --pretty=%H ...refs/heads/v2-master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/v2-master |cut -f1`" ]; then
/usr/bin/git stash >/dev/null 2>&1
/usr/bin/git pull >/dev/null 2>&1
/bin/chown -Rf www-data:www-data /var/www/media.scity.us/html
echo -e "${idsCL[Green]}Updated${idsCL[Default]}"
msg="Restarting NGINX"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
/bin/systemctl restart nginx >/dev/null 2>&1
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
else
echo -e "${idsCL[LightCyan]}Update not needed${idsCL[Default]}"
fi
echo "$(date) - Updated Organizr" >> $logfile
else