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>
This commit is contained in:
parent
8dc0b9ca45
commit
bfba94b93f
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue