Update mm-scripts.sh
This commit is contained in:
@@ -189,6 +189,7 @@ MMSTART(){
|
|||||||
### CHECK FOR PLEX MOUNT
|
### CHECK FOR PLEX MOUNT
|
||||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||||
if (( ! ${#files} )); then
|
if (( ! ${#files} )); then
|
||||||
|
echo "$(date) - Plex Media Not Mounted, will try and fix" >> $logfile
|
||||||
umount ${PLEX_MOUNT}
|
umount ${PLEX_MOUNT}
|
||||||
mount -a
|
mount -a
|
||||||
|
|
||||||
@@ -209,13 +210,15 @@ MMSTART(){
|
|||||||
if [ "${EMAIL_NOTICE}" != "" ] && [ ${PMFS} = true ]; then
|
if [ "${EMAIL_NOTICE}" != "" ] && [ ${PMFS} = true ]; then
|
||||||
echo "Could not mount the Plex Media Folder" | mail -s "Plex Media Not Mounted" ${EMAIL_NOTICE}
|
echo "Could not mount the Plex Media Folder" | mail -s "Plex Media Not Mounted" ${EMAIL_NOTICE}
|
||||||
touch /opt/idssys/mediamanager/mm.plexmount.fail
|
touch /opt/idssys/mediamanager/mm.plexmount.fail
|
||||||
|
echo "$(date) - Plex Media could not be mounted" >> $logfile
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
|
echo "$(date) - Plex Media mounted" >> $logfile
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
/bin/systemctl stop ${srvc}
|
/bin/systemctl stop ${srvc}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user