Update mm-scripts.sh

This commit is contained in:
2022-12-31 16:43:05 -06:00
parent 974ef8a143
commit 357ba20b8f

View File

@@ -34,9 +34,10 @@ MMSTART(){
[ $VERBOSE = true ] && chktmstart=`date +%s`
if [ "${1}" = "start" ] || [ "${1}" = "" ]; then
GOFORSTART=true;
elif [ "${1}" = "check" ] && [ "$(systemctl is-active openvpn)" != "active" ]; then
elif [ "${1}" = "check" ] && [ "$(systemctl is-active openvpn)" != "active" ] && [ ! -f /opt/mm.vpn* ]; then
GOFORSTART=true;
[ "${EMAIL_NOTICE}" != "" ] && echo "2nd Failure, will try and restart the VPN" | mail -s "Media Management systems started" ${EMAIL_NOTICE}
[ "${EMAIL_NOTICE}" != "" ] && echo "" | mail -s "Starting Media Management Systems" ${EMAIL_NOTICE}
echo "$(date) - Starting Media Management system - (openvpn not running)" >> $logfile
else
GOFORSTART=false;
fi