Update mm-scripts.sh

This commit is contained in:
2023-04-23 18:36:07 -05:00
parent 623cad8040
commit 2564fa743c

View File

@@ -259,14 +259,14 @@ MMSTART(){
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
### CHECK FOR PLEX MOUNT
if ( ! -f ${PLEX_MOUNT}/mounted ); then
if [ ! -f ${PLEX_MOUNT}/mounted ]; then
echo "$(date) - Plex Media Not Mounted, will try and fix" >> $logfile
umount ${PLEX_MOUNT} >/dev/null 2>&1
sleep 2s
mount -a >/dev/null 2>&1
sleep 2s
if ( ! -f ${PLEX_MOUNT}/mounted ); then
if [ ! -f ${PLEX_MOUNT}/mounted ]; then
if [ -f ${MMFOLDER}/mm.plexmount.fail ]; then
fd=$(( `date +%s` - `stat -L --format %Y ${MMFOLDER}/mm.plexmount.fail` ))
if [ ${fd} -gt 3600 ]; then
@@ -653,7 +653,7 @@ MMSTATUS(){
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[White]}${msg}${spc}${idsCL[White]} : ${idsCL[Default]}"
if ( ! -f ${PLEX_MOUNT}/mounted ) && [ ! -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
if [ ! -f ${PLEX_MOUNT}/mounted ] && [ ! -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
echo -e "${idsCL[Red]}Not Mounted${idsCL[Default]}"
elif [ -f ${MMFOLDER}/mm.plexmount.fail2 ]; then