Update mm-scripts.sh
This commit is contained in:
@@ -278,9 +278,9 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
|||||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||||
if (( ! ${#files} )); then
|
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}
|
umount ${PLEX_MOUNT} >/dev/null 2>&1
|
||||||
sleep 2s
|
sleep 2s
|
||||||
mount -a
|
mount -a >/dev/null 2>&1
|
||||||
sleep 2s
|
sleep 2s
|
||||||
|
|
||||||
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
files=$(shopt -s nullglob dotglob; echo ${PLEX_MOUNT}/*)
|
||||||
@@ -303,7 +303,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
|||||||
touch ${MMFOLDER}/mm.plexmount.fail
|
touch ${MMFOLDER}/mm.plexmount.fail
|
||||||
echo -e "${idsCL[Red]}Not Mounted, stopping services${idsCL[Default]}"
|
echo -e "${idsCL[Red]}Not Mounted, stopping services${idsCL[Default]}"
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
/bin/systemctl stop ${srvc}
|
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||||
done
|
done
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -311,7 +311,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
|||||||
rm -f ${MMFOLDER}/mm.plexmount.fail
|
rm -f ${MMFOLDER}/mm.plexmount.fail
|
||||||
echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile
|
echo "$(date) - Plex Media now mounted, stopping services to restart them" >> $logfile
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
/bin/systemctl stop ${srvc}
|
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user