surveillance récursive de /home/xbian/astroport avec inotifywait

This commit is contained in:
qo-op 2020-12-17 18:35:21 +01:00
parent e97a0a559f
commit e3c1db113d
1 changed files with 2 additions and 3 deletions

View File

@ -85,7 +85,7 @@ fi
# > <| |_) | | (_| | | | |
# /_/\_\_.__/|_|\__,_|_| |_|
#
# Transfert ~/astroport/films and animes to IPFS and make Vstream/ASTROPORT indexes on IPNS
# Transfert ~/astroport/*/files to IPFS and make Vstream/ASTROPORT indexes on IPNS
# OPTION 1 : NOT DELETING SOURCE
# NB: Index published in ~/.zen/ipfs/xbian is the same as files in ~/astroport/*/
@ -95,8 +95,7 @@ fi
# NB: INDEX published in ~/.zen/ipfs/xbian IS ONLY GROWING...
# Must manualy run "ipfs unpin" + "ipfs rm" to clean bad files from ~/.zen/ipfs/xbian/INDEXFILES !!!
if [[ ! $isinotifywaitRunning ]]; then
/usr/bin/inotifywait -e close_write -m /home/xbian/astroport/films | while read dir flags file; do $MY_PATH/zen/xbian_FASTRXBIAN.sh "$file"; done &
/usr/bin/inotifywait -e close_write -m /home/xbian/astroport/animes | while read dir flags file; do $MY_PATH/zen/xbian_AASTRXBIAN.sh "$file"; done &
/usr/bin/inotifywait -r -e close_write -m /home/xbian/astroport | while read dir flags file; do $MY_PATH/zen/xbian_vstream.sh "$dir" "$file"; done &
fi
# restart inotifywait (may be useless)