diff --git a/mm-scripts.sh b/mm-scripts.sh index 2bc60e8..052ef73 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -325,12 +325,12 @@ MMSTOP(){ echo touch ${MMFOLDER}/mm.stop - echo -en "${idsCL[LightCyan]}Stopping background MM scripts... ${idsCL[Default]}" - getMMbash=$(pgrep -f '/mm') - for i in $getMMbash; do - /bin/kill $i - done - echo -e "${idsCL[Green]} done${idsCL[Default]}" + # echo -en "${idsCL[LightCyan]}Stopping background MM scripts... ${idsCL[Default]}" + # getMMbash=$(pgrep -f '/mm') + # for i in $getMMbash; do + # /bin/kill $i + # done + # echo -e "${idsCL[Green]} done${idsCL[Default]}" echo -en "${idsCL[LightCyan]}Stopping Services... ${idsCL[Default]}" #for srvc in "${SERVICES_CHECK[@]}"; do @@ -504,12 +504,13 @@ if [ ! -f ${MMFOLDER}/mm.update.stop ]; then checkstopped=`expr $(date +%s) - $(stat -c %Y ${MMFOLDER}/mm.stop.checking)` if [ $checkstopped -gt 900 ]; then rm -f ${MMFOLDER}/mm.stop* + echo "$(date) - Bash script stuck in stop mode after doing a check, will restart" >> $logfile + SENDNOTICE "MM Script Error" "Bash script stuck in check mode, restarting system" + MMSTOP getStuckMM=$(pgrep -f '/mm') for i in $getStuckMM; do /bin/kill $i done - echo "$(date) - Bash script stuck in stop mode after doing a check" >> $logfile - SENDNOTICE "MM Script Error" "Bash script stuck in check mode" else exit 1 fi