Update mm-scripts.sh

This commit is contained in:
2023-06-30 19:28:54 -05:00
parent fa4091d974
commit 4a5b31966e

View File

@@ -58,7 +58,7 @@ MMCRONCHECK(){
elif [ $(date +%u) -eq 5 ] && [ $(date +%H)$(date +%M) -ge 1925 ] && [ $(date +%H)$(date +%M) -le 1930 ] ; then
# elif [ $(date +%H)$(date +%u) -eq 3 ] && [ $(date +%H)$(date +%M) -ge 0300 ] && [ $(date +%H)$(date +%M) -lt 0305 ] ; then
echo "update mm crontask triggered"
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
if [ $(expr `date +%s` - $(stat -c %Y ${MMFOLDER}/.git/ORIG_HEAD)) -gt 1 ] && [ "`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
echo "updating mm executing"
/usr/local/bin/mm update q >/dev/null 2>&1
source /opt/idssys/mediamanager/defaults.inc