diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index c5e7fb7a3..1411c1bdf 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -86,16 +86,23 @@ fi # /_/\_\_.__/|_|\__,_|_| |_| # # Transfert ~/astroport/films and animes to IPFS and make Vstream/ASTROPORT indexes on IPNS -# NOT DELETING SOURCE -[[ $(($minute % 30 )) == 0 ]] && $MY_PATH/zen/xbian_vstream.sh & -# restart inotifywait DELETING SOURCE -if [[ "$timebar" == "03:03" ]]; then -# killall inotifywait -# inotifywait -e close_write -m ~/astroport/films | while read dir flags file; do $MY_PATH/zen/xbian_FASTRXBIAN.sh "$file"; done & -# inotifywait -e close_write -m ~/astroport/animes | while read dir flags file; do $MY_PATH/zen/xbian_AASTRXBIAN.sh "$file"; done & +# OPTION 1 : NOT DELETING SOURCE +# NB: Index published in ~/.zen/ipfs/xbian is the same as files in ~/astroport/*/ +# [[ $(($minute % 30 )) == 0 ]] && $MY_PATH/zen/xbian_vstream.sh & + +# OPTION 2: DELETING SOURCE +# 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 + inotifywait -e close_write -m ~/astroport/films | while read dir flags file; do $MY_PATH/zen/xbian_FASTRXBIAN.sh "$file"; done & + inotifywait -e close_write -m ~/astroport/animes | while read dir flags file; do $MY_PATH/zen/xbian_AASTRXBIAN.sh "$file"; done & fi +# restart inotifywait (may be useless) +if [[ "$timebar" == "03:03" ]]; then + killall inotifywait +fi ## TODO investigate could breaks "ipfs p2p" forwards ? ##################################################################