diff --git a/mm-scripts.sh b/mm-scripts.sh index dd415ce..e4266a7 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -55,13 +55,12 @@ MMCRONCHECK(){ - # if [ $(date +%H)$(date +%u) -eq 4 ] && [ $(date +%H)$(date +%M) -ge 0400 ] && [ $(date +%H)$(date +%M) -le 0405 ] ; then - if [ $(date +%H)$(date +%M) -ge 0400 ] && [ $(date +%H)$(date +%M) -lt 0405 ] ; then + if [ $(date +%u) -eq 4 ] && [ $(date +%H)$(date +%M) -ge 0400 ] && [ $(date +%H)$(date +%M) -le 0405 ] ; then if [ $(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/vers.info)) -gt 600 ]; then /usr/local/bin/mm update-allservices q >/dev/null 2>&1 echo "$(date) - Updated All Services" >> $logfile fi - elif [ $(date +%H)$(date +%M) -ge 0300 ] && [ $(date +%H)$(date +%M) -lt 0305 ] ; then + elif [ $(date +%H)$(date +%u) -eq 3 ] && [ $(date +%H)$(date +%M) -ge 0300 ] && [ $(date +%H)$(date +%M) -lt 0305 ] ; then if [ $(expr `date +%s` - $(stat -c %Y ${MMFOLDER}/.git/ORIG_HEAD)) -gt 600 ] && [ "`git -C /opt/idssys/nodemgmt log --pretty=%H ...refs/heads/${GBRANCH}^ | head -n 1`" != "`git -C /opt/idssys/nodemgmt ls-remote origin -h refs/heads/${GBRANCH} |cut -f1`" ]; then /usr/local/bin/mm update q >/dev/null 2>&1 source /opt/idssys/mediamanager/defaults.inc