add notify script

master
meftimes 2024-02-10 23:11:02 -05:00
parent 9e0623f4e0
commit 012e7f58d2
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
inotifywait -m ./testinotify -e create -e moved_to |
while read dir file; do
curl \
-u :ntfy_token_goes_here \
-H "Priority: urgent" \
-H "Tags: arrow_down" \
-H "Title: Download Complete" \
-d "$file" \
https://ntfy_url_goes_here
done
# Source: https://unix.stackexchange.com/questions/24952/tool-to-monitor-folder-for-new-files-and-run-command-whenever-new-file-is-detect