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=""
elif [ "${1}" = "check" ] && [ ${cc} -eq 0 ]; then
touch /opt/mm.vpn.fail
echo date " - VPN Failure on 1st check" >> $logfile
echo "$(date) - VPN Failure on 1st check" >> $logfile
MMSTOP
sleep 1m
"${VPN_START[@]}"
@@ -52,7 +52,7 @@ MMSTART(){
fi
if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; 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
rm -f /opt/mm.vpn.fail
MMSTOP
@@ -61,11 +61,11 @@ MMSTART(){
rm -f /opt/mm.stop
exit 1
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
exit 1
else
echo date " - VPN Failure #1" >> $logfile
echo "$(date) - VPN Failure #1" >> $logfile
touch /opt/mm.vpn.fail
MMSTOP
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
fi
echo date " - Media Management systems started" >> $logfile
echo "$(date) - Media Management systems started" >> $logfile
rm -f /opt/mm.stop
rm -f /opt/mm.vpn.fail*
echo
@@ -181,7 +181,7 @@ MMSTOP(){
checked=""
fi
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
echo -e "${idsCL[Green]} done${idsCL[Default]}"