Update mm-scripts.sh

This commit is contained in:
2023-04-21 13:33:38 -05:00
parent d445ad8c50
commit c03ea631af

View File

@@ -278,9 +278,9 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
if (( ! ${#files} )); then
echo "$(date) - Plex Media Not Mounted, will try and fix" >> $logfile
umount ${PLEX_MOUNT}
umount ${PLEX_MOUNT} >/dev/null 2>&1
sleep 2s
mount -a
mount -a >/dev/null 2>&1
sleep 2s
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
@@ -303,7 +303,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
touch ${MMFOLDER}/mm.plexmount.fail
echo -e "${idsCL[Red]}Not Mounted, stopping services${idsCL[Default]}"
for srvc in "${SERVICES_CHECK[@]}"; do
/bin/systemctl stop ${srvc}
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
done
else
@@ -311,7 +311,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
rm -f ${MMFOLDER}/mm.plexmount.fail
echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile
for srvc in "${SERVICES_CHECK[@]}"; do
/bin/systemctl stop ${srvc}
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
done
fi
else