Update mm-scripts.sh
This commit is contained in:
@@ -45,7 +45,8 @@ MMCRONCHECK(){
|
||||
[ ${#OUT} = 0 ] && /bin/ip route add default via ${DEFAULT_GW}
|
||||
fi
|
||||
|
||||
if [ $(date +%u) -eq 4 ] && [ $(date +%H)$(date +%M) -ge 0400 ] && [ $(date +%H)$(date +%M) -le 0405 ] ; then
|
||||
# if [ $(date +%u) -eq 4 ] && [ $(date +%H)$(date +%M) -ge 0400 ] && [ $(date +%H)$(date +%M) -le 0405 ] ; then
|
||||
if [ $(date +%u) -eq 4 ] && [ $(date +%H)$(date +%M) -ge 1925 ] && [ $(date +%H)$(date +%M) -le 1930 ] ; then
|
||||
echo "update services crontask triggered"
|
||||
if [ $(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/vers.info)) -gt 600 ]; then
|
||||
echo "updating services executing"
|
||||
@@ -58,7 +59,7 @@ MMCRONCHECK(){
|
||||
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
|
||||
echo "updating mm executing"
|
||||
/usr/local/bin/mm update ${1} >/dev/null 2>&1
|
||||
/usr/local/bin/mm update q >/dev/null 2>&1
|
||||
source /opt/idssys/mediamanager/defaults.inc
|
||||
echo "$(date) - Updated MM Scripts to v${VERS}" >> $logfile
|
||||
else
|
||||
@@ -69,10 +70,10 @@ MMCRONCHECK(){
|
||||
fi
|
||||
|
||||
# if [ -f ${TMPFOLDER}/mm.stop ]; then
|
||||
# /usr/local/bin/mm check ${1} >/dev/null 2>&1
|
||||
# /usr/local/bin/mm check q >/dev/null 2>&1
|
||||
# else
|
||||
# echo -e "$(date) - Starting log #############################" >> ${outputlogfile}
|
||||
# /usr/local/bin/mm check ${1} >> ${outputlogfile}
|
||||
# /usr/local/bin/mm check q >> ${outputlogfile}
|
||||
# echo -e "$(date) - Finished log #############################" >> ${outputlogfile}
|
||||
# fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user