Update mm-scripts.sh
This commit is contained in:
@@ -304,7 +304,7 @@ MMSTART(){
|
||||
echo "$(date) - Plex Media could not be mounted" >> $logfile
|
||||
fi
|
||||
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
|
||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||
done
|
||||
@@ -313,20 +313,20 @@ MMSTART(){
|
||||
else
|
||||
echo -e "${idsCL[Green]}Mounted, fixed${idsCL[Default]}"
|
||||
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
|
||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||
/bin/systemctl restart ${srvc} >/dev/null 2>&1 &
|
||||
done
|
||||
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
||||
fi
|
||||
else
|
||||
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]}"
|
||||
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
|
||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||
/bin/systemctl restart ${srvc} >/dev/null 2>&1 &
|
||||
done
|
||||
rm -f ${MMFOLDER}/mm.plexmount.fail*
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user