Update mm-scripts.sh
This commit is contained in:
@@ -185,6 +185,36 @@ MMSTART(){
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
### CHECK FOR PLEX MOUNT
|
||||||
|
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||||
|
if (( ! ${#files} )); then
|
||||||
|
umount ${PLEX_MOUNT}
|
||||||
|
mount -a
|
||||||
|
|
||||||
|
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||||
|
if (( ! ${#files} )); then
|
||||||
|
if [ -f /opt/idssys/mediamanager/mm.plexmount.fail ]; then
|
||||||
|
fd=$(( `date +%s` - `stat -L --format %Y /opt/idssys/mediamanager/mm.plexmount.fail` ))
|
||||||
|
if [ ${fd} -gt 3600 ]; then
|
||||||
|
PMFS=true
|
||||||
|
rm -f /opt/idssys/mediamanager/mm.plexmount.fail
|
||||||
|
else
|
||||||
|
PMFS=false
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PMFS=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo -en "${idsCL[LightCyan]}${mmsv} Services... ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}${mmsv} Services... ${idsCL[Default]}"
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
/bin/systemctl start ${srvc}
|
/bin/systemctl start ${srvc}
|
||||||
|
|||||||
Reference in New Issue
Block a user