Update mm-scripts.sh

This commit is contained in:
2022-05-13 21:35:57 -05:00
parent dd138fa295
commit c7274b2b76

View File

@@ -43,7 +43,7 @@ MMSTART(){
checked="" checked=""
elif [ "${1}" = "check" ] && [ ${cc} -eq 0 ]; then elif [ "${1}" = "check" ] && [ ${cc} -eq 0 ]; then
touch /opt/mm.vpn.fail touch /opt/mm.vpn.fail
echo date " - VPN Failure on 1st check" >> $logfile echo "$(date) - VPN Failure on 1st check" >> $logfile
MMSTOP MMSTOP
sleep 1m sleep 1m
"${VPN_START[@]}" "${VPN_START[@]}"
@@ -52,7 +52,7 @@ MMSTART(){
fi fi
if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; then if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; then
if [ -f /opt/mm.vpn.fail ]; then if [ -f /opt/mm.vpn.fail ]; then
echo date " - VPN Failure #2" >> $logfile echo "$(date) - VPN Failure #2" >> $logfile
touch /opt/mm.vpn.fail2 touch /opt/mm.vpn.fail2
rm -f /opt/mm.vpn.fail rm -f /opt/mm.vpn.fail
MMSTOP MMSTOP
@@ -61,11 +61,11 @@ MMSTART(){
rm -f /opt/mm.stop rm -f /opt/mm.stop
exit 1 exit 1
elif [ -f /opt/mm.vpn.fail2 ]; then elif [ -f /opt/mm.vpn.fail2 ]; then
echo date " - VPN Failure #3 - Shutting down Media Management systems" >> $logfile echo "$(date) - VPN Failure #3 - Shutting down Media Management systems" >> $logfile
MMSTOP MMSTOP
exit 1 exit 1
else else
echo date " - VPN Failure #1" >> $logfile echo "$(date) - VPN Failure #1" >> $logfile
touch /opt/mm.vpn.fail touch /opt/mm.vpn.fail
MMSTOP MMSTOP
sleep 1m sleep 1m
@@ -121,7 +121,7 @@ MMSTART(){
echo -e "${idsCL[LightCyan]}It may take a couple of minutes before all systems fully start${idsCL[Default]}" echo -e "${idsCL[LightCyan]}It may take a couple of minutes before all systems fully start${idsCL[Default]}"
echo echo
fi fi
echo date " - Media Management systems started" >> $logfile echo "$(date) - Media Management systems started" >> $logfile
rm -f /opt/mm.stop rm -f /opt/mm.stop
rm -f /opt/mm.vpn.fail* rm -f /opt/mm.vpn.fail*
echo echo
@@ -181,7 +181,7 @@ MMSTOP(){
checked="" checked=""
fi fi
done done
echo date " - Media Management systems stopped" >> $logfile echo "$(date) - Media Management systems stopped" >> $logfile
/bin/ip route add default via 10.10.0.1 /bin/ip route add default via 10.10.0.1
echo -e "${idsCL[Green]} done${idsCL[Default]}" echo -e "${idsCL[Green]} done${idsCL[Default]}"