diff --git a/mm-scripts.sh b/mm-scripts.sh index 7667b35..d661794 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -55,13 +55,13 @@ MMSTART(){ "${VPN_START[@]}" & sleep 30s rm -f /opt/mm.stop - [ $VERBOSE = true ] && debuglogstop() + [ $VERBOSE = true ] && debuglogstop exit 1 elif [ -f /opt/mm.vpn.fail2 ]; then echo "$(date) - VPN Failure #3 - Shutting down Media Management systems" >> $logfile [ $SENDNOTICE = true ] && echo "Final Failure, shutting down system" | mail -s "VPN Failure" 9208839613@mms.att.net MMSTOP - [ $VERBOSE = true ] && debuglogstop() + [ $VERBOSE = true ] && debuglogstop exit 1 else echo -e "${idsCL[Red]} failed, restarting system${idsCL[Default]}" @@ -73,7 +73,7 @@ MMSTART(){ "${VPN_START[@]}" & sleep 30s rm -f /opt/mm.stop - [ $VERBOSE = true ] && debuglogstop() + [ $VERBOSE = true ] && debuglogstop exit 1 fi @@ -106,7 +106,7 @@ MMSTART(){ "${VPN_START[@]}" & sleep 1m rm -f /opt/mm.stop - [ $VERBOSE = true ] && debuglogstop() + [ $VERBOSE = true ] && debuglogstop exit 1 fi ((cc=${cc}+1)) @@ -134,7 +134,7 @@ MMSTART(){ "${VPN_START[@]}" & sleep 1m rm -f /opt/mm.stop - [ $VERBOSE = true ] && debuglogstop() + [ $VERBOSE = true ] && debuglogstop exit 1 fi ((cc=${cc}+1)) @@ -154,7 +154,7 @@ MMSTART(){ "${VPN_START[@]}" & sleep 1m rm -f /opt/mm.stop - [ $VERBOSE = true ] && debuglogstop() + [ $VERBOSE = true ] && debuglogstop exit 1 fi @@ -183,7 +183,7 @@ MMSTART(){ fi echo - [ $VERBOSE = true ] && debuglogstop() + [ $VERBOSE = true ] && debuglogstop #exit 0 }