From 11f5447749cde66e85b1926672ba34cfe65ffc55 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 27 Apr 2023 14:09:43 -0500 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index c920454..510f45b 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -304,7 +304,7 @@ MMSTART(){ echo "$(date) - Plex Media could not be mounted" >> $logfile fi echo -e "${idsCL[Red]}Not Mounted${idsCL[Default]}" - if [ ! -f ${MMFOLDER}/mm.noservices ]; then + if [ ! -f ${MMFOLDER}/mm.plexmount.fail2 ]; then for srvc in "${SERVICES_CHECK[@]}"; do /bin/systemctl stop ${srvc} >/dev/null 2>&1 & done @@ -313,20 +313,20 @@ MMSTART(){ else echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}" SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!" - echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile + echo "$(date) - Plex Media now mounted, restarting services" >> $logfile for srvc in "${SERVICES_CHECK[@]}"; do - /bin/systemctl stop ${srvc} >/dev/null 2>&1 & + /bin/systemctl restart ${srvc} >/dev/null 2>&1 & done rm -f ${MMFOLDER}/mm.plexmount.fail* fi else echo -e "${idsCL[Green]}Mounted${idsCL[Default]}" - if [ -f ${MMFOLDER}/mm.plexmount.fail ] || [ -f ${MMFOLDER}/mm.plexmount.fail2 ]; then + if [ -f ${MMFOLDER}/mm.plexmount.fail ]; then echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}" SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!" - echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile + echo "$(date) - Plex Media now mounted, restarting services" >> $logfile for srvc in "${SERVICES_CHECK[@]}"; do - /bin/systemctl stop ${srvc} >/dev/null 2>&1 & + /bin/systemctl restart ${srvc} >/dev/null 2>&1 & done rm -f ${MMFOLDER}/mm.plexmount.fail* fi