github.com/metacurrency/holochain@v0.1.0-alpha-26.0.20200915073418-5c83169c9b5b/docker/app.docker/syncedMultiNode.containers.scripts/sync (about) 1 #!/bin/sh 2 3 4 syncDir="/runtime/cluster/sync" 5 [ -d "$syncDir" ] || mkdir $syncDir $> /dev/null 6 7 syncFile=$1 8 9 if ! ls $syncDir/$syncFile &> /dev/null ; then 10 if ! ls $syncDir/$syncFile.* &> /dev/null ; then 11 ls $syncDir 12 echo "HC: sync: WARNING: There was never a sync file: $syncFile to begin with" 13 fi 14 fi 15 16 while true 17 do 18 if ! ls $syncDir/$syncFile &> /dev/null; then 19 if ! ls $syncDir/$syncFile.* &> /dev/null ; then 20 echo "HC: $syncFile sync released" 21 exit 0 22 fi 23 fi 24 #echo "HC: sync waiting on $syncFile" 25 sleep 0.1 26 done