Update mm-scripts.sh
This commit is contained in:
@@ -259,17 +259,14 @@ MMSTART(){
|
|||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||||
|
|
||||||
### CHECK FOR PLEX MOUNT
|
### CHECK FOR PLEX MOUNT
|
||||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
if ( ! -f ${PLEX_MOUNT}/mounted ); then
|
||||||
echo "HERE: $files"
|
|
||||||
if (( ! ${#files} )); then
|
|
||||||
echo "$(date) - Plex Media Not Mounted, will try and fix" >> $logfile
|
echo "$(date) - Plex Media Not Mounted, will try and fix" >> $logfile
|
||||||
umount ${PLEX_MOUNT} >/dev/null 2>&1
|
umount ${PLEX_MOUNT} >/dev/null 2>&1
|
||||||
sleep 2s
|
sleep 2s
|
||||||
mount -a >/dev/null 2>&1
|
mount -a >/dev/null 2>&1
|
||||||
sleep 2s
|
sleep 2s
|
||||||
|
|
||||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
if ( ! -f ${PLEX_MOUNT}/mounted ); then
|
||||||
if (( ! ${#files} )); then
|
|
||||||
if [ -f ${MMFOLDER}/mm.plexmount.fail ]; then
|
if [ -f ${MMFOLDER}/mm.plexmount.fail ]; then
|
||||||
fd=$(( `date +%s` - `stat -L --format %Y ${MMFOLDER}/mm.plexmount.fail` ))
|
fd=$(( `date +%s` - `stat -L --format %Y ${MMFOLDER}/mm.plexmount.fail` ))
|
||||||
if [ ${fd} -gt 3600 ]; then
|
if [ ${fd} -gt 3600 ]; then
|
||||||
@@ -656,8 +653,7 @@ MMSTATUS(){
|
|||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[White]}${msg}${spc}${idsCL[White]} : ${idsCL[Default]}"
|
echo -en "${idsCL[White]}${msg}${spc}${idsCL[White]} : ${idsCL[Default]}"
|
||||||
|
|
||||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
if ( ! -f ${PLEX_MOUNT}/mounted ) && [ ! -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
|
||||||
if (( ! ${#files} )) && [ ! -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
|
|
||||||
echo -e "${idsCL[Red]}Not Mounted${idsCL[Default]}"
|
echo -e "${idsCL[Red]}Not Mounted${idsCL[Default]}"
|
||||||
|
|
||||||
elif [ -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
|
elif [ -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user