From 5a82d3ec7ffdd4d8af4bda642bebda3c896daa51 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 22 Jan 2023 10:46:45 -0600 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index 8f5ea2c..6451018 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -189,6 +189,7 @@ MMSTART(){ ### CHECK FOR PLEX MOUNT files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*) if (( ! ${#files} )); then + echo "$(date) - Plex Media Not Mounted, will try and fix" >> $logfile umount ${PLEX_MOUNT} mount -a @@ -209,11 +210,13 @@ MMSTART(){ if [ "${EMAIL_NOTICE}" != "" ] && [ ${PMFS} = true ]; then echo "Could not mount the Plex Media Folder" | mail -s "Plex Media Not Mounted" ${EMAIL_NOTICE} touch /opt/idssys/mediamanager/mm.plexmount.fail - else - for srvc in "${SERVICES_CHECK[@]}"; do - /bin/systemctl stop ${srvc} - done + echo "$(date) - Plex Media could not be mounted" >> $logfile fi + else + echo "$(date) - Plex Media mounted" >> $logfile + for srvc in "${SERVICES_CHECK[@]}"; do + /bin/systemctl stop ${srvc} + done fi fi