diff --git a/mm-scripts.sh b/mm-scripts.sh index c4b0e9b..668c751 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -832,14 +832,18 @@ UPDATESERVICE(){ echo -e "${idsCL[Green]}Updating ${usrvc^} Service${idsCL[Default]}" DIVIDER . lightGreen if [ "${usrvc}" == "organizr" ]; then + msg="Checking for update"; 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 if [ "`git log --pretty=%H ...refs/heads/v2-master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/v2-master |cut -f1`" ]; then - msg="Updating Organizr Web UI Interface"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + echo -e "${idsCL[Green]}Done${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 /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]}" + 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]}" @@ -847,7 +851,7 @@ UPDATESERVICE(){ echo -e "${idsCL[Green]}Done${idsCL[Default]}" echo "$(date) - Updating Service (${usrvc}) : Completed" >> $logfile else - echo -e " ${idsCL[LightCyan]} Update Not Needed ${idsCL[Default]}" + echo -e "${idsCL[LightCyan]}Update Not Needed${idsCL[Default]}" echo "$(date) - Updating Service (${usrvc}) : Update Not Needed" >> $logfile fi