change inotifaywait command to mint_youtube.sh

This commit is contained in:
Armust Blegde 2020-12-24 15:49:41 +01:00
parent 132298b0d0
commit 7d24ed512d
1 changed files with 3 additions and 9 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash
########################################################################
# Author: Fred (support@qo-op.com)
# Armust Blegde release
# Version: 0.3
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
########################################################################
@ -83,20 +84,13 @@ fi
# __ _| |__ (_) __ _ _ __
# \ \/ / '_ \| |/ _` | '_ \
# > <| |_) | | (_| | | | |
# /_/\_\_.__/|_|\__,_|_| |_|
# /_/\_\_.__/|_|\__,_|_| |_| ASTROPORT youtube mp3
#
# 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/*/
# [[ $(($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
mkdir -p /home/$YOU/astroport
/usr/bin/inotifywait -r -e close_write -m /home/$YOU/astroport | while read dir flags file; do $MY_PATH/zen/xbian_vstream.sh "$dir" "$file"; done &
/usr/bin/inotifywait -r -e close_write -m /home/$YOU/astroport | while read dir flags file; do $MY_PATH/zen/mint_youtube.sh "$dir" "$file"; done &
fi
# restart inotifywait (may be useless)