Update mm-scripts.sh

This commit is contained in:
2023-04-23 18:15:46 -05:00
parent b9b1cd3675
commit ff239cfcc2

View File

@@ -260,7 +260,7 @@ MMSTART(){
### CHECK FOR PLEX MOUNT
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
if (( ! ${#files} )) && ([ ! -f ${MMFOLDER}/mm.plexmount.fail2 ] || [ "${1}" == "start" ]); then
if (( ! ${#files} )); then
echo "$(date) - Plex Media Not Mounted, will try and fix" >> $logfile
umount ${PLEX_MOUNT} >/dev/null 2>&1
sleep 2s
@@ -304,7 +304,10 @@ MMSTART(){
else
echo -e "${idsCL[Green]}Mounted${idsCL[Default]}"
rm -f ${MMFOLDER}/mm.plexmount.fail*
if [ -f ${MMFOLDER}/mm.plexmount.fail* ]; then
SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!" 1
rm -f ${MMFOLDER}/mm.plexmount.fail*
fi
fi
if [ -f ${MMFOLDER}/mm.plexmount.fail ] && [ "${1}" == "start" ] && [ "${2}" != "vpn" ]; then