Merge remote-tracking branch 'origin/dev-poka' into dev-fred

This commit is contained in:
qo-op 2019-12-19 15:18:54 +01:00
commit 35f94120ce
1 changed files with 22 additions and 0 deletions

22
wait_actions/sync_ipfs.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
YOU=$(ps aux --sort=+utime | grep ipfs | tail -n 1 | cut -d " " -f 1)
IPFSNODEID=$(ipfs id -f='<id>\n')
#toWatch="$MY_PATH/../wallets_swarm/.$IPFSNODEID"
toWatch="./test"
inotifywait -r -q -e create,close_write,delete -m "$toWatch" |
while read -s -r directory event filename; do
## Action à réaliser lors du changement d'état de ce dossier
## ipfs_swarm_wallets_refresh
echo "$filename $event in $directory !" # >> /tmp/g1sms.log
done
exit 0