handle missing and uncreatable notifdirs more gracefully

Original patch by ~kgp445

https://todo.sr.ht/~mil/sxmo-tickets/94
Signed-off-by: Anjandev Momi <anjan@momi.ca>
master
Anjandev Momi 4 years ago
parent 8dc0b9ca45
commit bfba94b93f
  1. 3
      scripts/notifications/sxmo_notificationmonitor.sh

@ -63,6 +63,9 @@ syncled() {
monitorforaddordelnotifs() {
while true; do
if [ ! -e "$NOTIFDIR" ]; then
mkdir -p "$NOTIFDIR" || sleep 10
fi
inotifywait -e create,attrib,moved_to,delete,delete_self,moved_from "$NOTIFDIR"/ | (
INOTIFYOUTPUT="$(cat)"
INOTIFYEVENTTYPE="$(echo "$INOTIFYOUTPUT" | cut -d" " -f2)"

Loading…
Cancel
Save