diff --git a/mm-scripts.sh b/mm-scripts.sh index a565ba1..436f78d 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -836,8 +836,8 @@ UPDATESERVICE(){ echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}" cd /var/www/media.scity.us/html >/dev/null 2>&1 - if [ "`git log --pretty=%H ...refs/heads/v2-master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/v2-master |cut -f1`" ]; then - 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`" ] || [ "${2}" == "force" ]; then + [ "${2}" == "force" ] && echo -e "${idsCL[LightCyan]}Update Not Needed, forcing anyway${idsCL[Default]}" || echo -e "${idsCL[Green]}Update Available${idsCL[Default]}" msg="Updating service"; 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]}" /usr/bin/git stash >/dev/null 2>&1 @@ -875,7 +875,7 @@ UPDATESERVICE(){ cver=${usrvc}_VER if [ "${!cver}" != "${latest_ver}" ] || [ "${2}" == "force" ]; then - [ "${2}" == "force" ] && echo -e "${idsCL[LightCyan]}Update Not Needed, but forcing anyway${idsCL[Default]}" || echo -e "${idsCL[Green]}Done${idsCL[Default]}" + [ "${2}" == "force" ] && echo -e "${idsCL[LightCyan]}Update Not Needed, forcing anyway${idsCL[Default]}" || echo -e "${idsCL[Green]}Update Available${idsCL[Default]}" # rm -f ${MMFOLDER}/logs/update.${usrvc} touch ${MMFOLDER}/logs/update.${usrvc} @@ -979,7 +979,7 @@ SERVICEBACKUPSTART(){ msg="Starting Service"; 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]}" OUT=$(ip link | grep "$VPN_INTERFACE") >/dev/null 2>&1 - if [[ " ${SERVICES_CHECK[*]} " =~ " ${usrvc} " ]] && [ ! -f ${MMFOLDER}/mm.noservices ] && [ ! `find /opt/idssys/mediamanager/ -name 'mm.plexmount.fail*'` ]; then + if [ ! -f ${MMFOLDER}/mm.stop ] && [[ " ${SERVICES_CHECK[*]} " =~ " ${usrvc} " ]] && [ ! -f ${MMFOLDER}/mm.noservices ] && [ ! `find /opt/idssys/mediamanager/ -name 'mm.plexmount.fail*'` ]; then /bin/systemctl disable ${usrvc} >> ${MMFOLDER}/logs/update.${usrvc} /bin/systemctl start ${usrvc} >> ${MMFOLDER}/logs/update.${usrvc} [ "${usrvc}" == "radarr" ] && [[ " ${SERVICES_CHECK[*]} " =~ " radarr3d " ]] && /bin/systemctl start radarr3d >> ${MMFOLDER}/logs/update.${usrvc}