inotifywait

This commit is contained in:
qo-op 2021-03-06 22:31:15 +01:00
parent cd70391f3e
commit b602afbac7
1 changed files with 0 additions and 2 deletions

View File

@ -98,11 +98,9 @@ fi
# ON Rpi/xbian files added in ~/astroport are monitored to activate "new_file_in_astroport.sh"
# Transfert ~/astroport/*/files to IPFS and make Astroport/KODI indexes in IPNS
if [[ "$YOU" == "xbian" ]]; then
echo "XBIAN"
[[ ! -e /home/$YOU/astroport ]] && mkdir -p /home/$YOU/astroport
# VERIFY LAUNCH inotifywait ?!
inotifywaitRunning=$(ps auxf --sort=+utime | grep -w inotifywait | grep -w astroport | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1)
echo "inotifywaitRunning = $inotifywaitRunning"
if [[ "$inotifywaitRunning" != "xbian" ]]
then
/usr/bin/inotifywait -r -e close_write -m /home/$YOU/astroport | while read dir flags file; do $MY_PATH/zen/new_file_in_astroport.sh "$dir" "$file"; done &