Update mm-scripts.sh
This commit is contained in:
@@ -269,7 +269,6 @@ MMSTART(){
|
||||
sleep 2s
|
||||
|
||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||
echo "HERE: $files"
|
||||
if (( ! ${#files} )); then
|
||||
if [ -f ${MMFOLDER}/mm.plexmount.fail ]; then
|
||||
fd=$(( `date +%s` - `stat -L --format %Y ${MMFOLDER}/mm.plexmount.fail` ))
|
||||
@@ -294,11 +293,12 @@ MMSTART(){
|
||||
|
||||
else
|
||||
echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}"
|
||||
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
||||
SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!" 1
|
||||
echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile
|
||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||
done
|
||||
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
||||
fi
|
||||
elif [ -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
|
||||
mount -a >/dev/null 2>&1
|
||||
@@ -307,7 +307,12 @@ MMSTART(){
|
||||
else
|
||||
echo -e "${idsCL[Green]}Mounted${idsCL[Default]}"
|
||||
if [ -f ${MMFOLDER}/mm.plexmount.fail* ]; then
|
||||
echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}"
|
||||
SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!" 1
|
||||
echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile
|
||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||
done
|
||||
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user