Update mm-scripts.sh
This commit is contained in:
@@ -304,7 +304,7 @@ MMSTART(){
|
|||||||
echo "$(date) - Plex Media could not be mounted" >> $logfile
|
echo "$(date) - Plex Media could not be mounted" >> $logfile
|
||||||
fi
|
fi
|
||||||
echo -e "${idsCL[Red]}Not Mounted${idsCL[Default]}"
|
echo -e "${idsCL[Red]}Not Mounted${idsCL[Default]}"
|
||||||
if [ ! -f ${MMFOLDER}/mm.noservices ]; then
|
if [ ! -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||||
done
|
done
|
||||||
@@ -313,20 +313,20 @@ MMSTART(){
|
|||||||
else
|
else
|
||||||
echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}"
|
||||||
SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!"
|
SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!"
|
||||||
echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile
|
echo "$(date) - Plex Media now mounted, restarting services" >> $logfile
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
/bin/systemctl restart ${srvc} >/dev/null 2>&1 &
|
||||||
done
|
done
|
||||||
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${idsCL[Green]}Mounted${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Mounted${idsCL[Default]}"
|
||||||
if [ -f ${MMFOLDER}/mm.plexmount.fail ] || [ -f ${MMFOLDER}/mm.plexmount.fail2 ]; then
|
if [ -f ${MMFOLDER}/mm.plexmount.fail ]; then
|
||||||
echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}"
|
||||||
SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!"
|
SENDNOTICE "Plex Media Mounted" "The Plex Media Folder was successfully re-mounted again!"
|
||||||
echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile
|
echo "$(date) - Plex Media now mounted, restarting services" >> $logfile
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
/bin/systemctl restart ${srvc} >/dev/null 2>&1 &
|
||||||
done
|
done
|
||||||
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user