Update mm-scripts.sh
This commit is contained in:
@@ -49,7 +49,7 @@ MMCRONCHECK(){
|
|||||||
echo "update services crontask triggered"
|
echo "update services crontask triggered"
|
||||||
if [ $(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/vers.info)) -gt 600 ]; then
|
if [ $(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/vers.info)) -gt 600 ]; then
|
||||||
echo "updating services executing"
|
echo "updating services executing"
|
||||||
# /usr/local/bin/mm update-allservices q >/dev/null 2>&1
|
# /usr/local/bin/mm update-allservices ${1} >/dev/null 2>&1
|
||||||
echo "$(date) - Updated All Services" >> $logfile
|
echo "$(date) - Updated All Services" >> $logfile
|
||||||
else
|
else
|
||||||
echo "not updating"
|
echo "not updating"
|
||||||
@@ -58,7 +58,7 @@ MMCRONCHECK(){
|
|||||||
echo "update mm crontask triggered"
|
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 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"
|
echo "updating mm executing"
|
||||||
/usr/local/bin/mm update q >/dev/null 2>&1
|
/usr/local/bin/mm update ${1} >/dev/null 2>&1
|
||||||
source /opt/idssys/mediamanager/defaults.inc
|
source /opt/idssys/mediamanager/defaults.inc
|
||||||
echo "$(date) - Updated MM Scripts to v${VERS}" >> $logfile
|
echo "$(date) - Updated MM Scripts to v${VERS}" >> $logfile
|
||||||
else
|
else
|
||||||
@@ -69,10 +69,10 @@ MMCRONCHECK(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# if [ -f ${TMPFOLDER}/mm.stop ]; then
|
# if [ -f ${TMPFOLDER}/mm.stop ]; then
|
||||||
# /usr/local/bin/mm check q >/dev/null 2>&1
|
# /usr/local/bin/mm check ${1} >/dev/null 2>&1
|
||||||
# else
|
# else
|
||||||
# echo -e "$(date) - Starting log #############################" >> ${outputlogfile}
|
# echo -e "$(date) - Starting log #############################" >> ${outputlogfile}
|
||||||
# /usr/local/bin/mm check q >> ${outputlogfile}
|
# /usr/local/bin/mm check ${1} >> ${outputlogfile}
|
||||||
# echo -e "$(date) - Finished log #############################" >> ${outputlogfile}
|
# echo -e "$(date) - Finished log #############################" >> ${outputlogfile}
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
@@ -1489,7 +1489,7 @@ if [ ! -f ${TMPFOLDER}/mm.update.stop ]; then
|
|||||||
fi
|
fi
|
||||||
case $action in
|
case $action in
|
||||||
clear) echo -e "${idsCL[LightCyan]}Clearing all mm.* files ${idsCL[Default]}"; echo;;
|
clear) echo -e "${idsCL[LightCyan]}Clearing all mm.* files ${idsCL[Default]}"; echo;;
|
||||||
cron) MMCRONCHECK;;
|
cron) MMCRONCHECK ${2};;
|
||||||
setup) MMSETUP;;
|
setup) MMSETUP;;
|
||||||
vpninfo) GETVPNINFO;;
|
vpninfo) GETVPNINFO;;
|
||||||
speedtest) VPNSPEEDTEST;;
|
speedtest) VPNSPEEDTEST;;
|
||||||
|
|||||||
Reference in New Issue
Block a user