Fix sxmo_notificationmonitor.sh to ensure script running doesnt overlap; (kill)

This commit is contained in:
Miles Alan 2020-08-20 19:47:08 -05:00
parent 4f118bb767
commit 7559984430
2 changed files with 22 additions and 16 deletions

View file

@ -17,7 +17,7 @@ writenotification() {
if [ "$NOTIFFILEPATHTOWRITE" = "random" ]; then
NOTIFFILEPATHTOWRITE="$NOTIFDIR/$(tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 10)"
fi
rm -f "$NOTIFFILEPATHTOWRITE"
touch "$NOTIFFILEPATHTOWRITE"
printf %b "$ACTION\n$WATCHFILE\n$NOTIFMSG\n" > "$NOTIFFILEPATHTOWRITE"
}