Update mm-scripts.sh
This commit is contained in:
@@ -259,17 +259,14 @@ MMSTART(){
|
||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||
|
||||
### CHECK FOR PLEX MOUNT
|
||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||
echo "HERE: $files"
|
||||
if (( ! ${#files} )); 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
|
||||
|
||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||
if (( ! ${#files} )); 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
|
||||
@@ -656,8 +653,7 @@ MMSTATUS(){
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[White]}${msg}${spc}${idsCL[White]} : ${idsCL[Default]}"
|
||||
|
||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||
if (( ! ${#files} )) && [ ! -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
|
||||
|
||||
Reference in New Issue
Block a user