github.com/metacurrency/holochain@v0.1.0-alpha-26.0.20200915073418-5c83169c9b5b/docker/app.docker/syncedMultiNode.containers.scripts/hc.sync (about)

     1  #!/bin/sh
     2  export "PATH=/Scripts/syncedMultiNode.containers.scripts:$PATH"
     3  
     4  syncStart hc.sync.counter.$HOSTNAME hc.sync.ready.$HOSTNAME hc.sync.complete.$HOSTNAME
     5  
     6  #ls /runtime/cluster/sync
     7  
     8  sync externalStartEvent
     9  
    10  cnys hc.sync.counter.$HOSTNAME
    11  
    12  sync bs
    13  
    14  seedID=`cat /chain.seeded/devchain/.seedID`
    15  clusterDir="/chain.seeded/devchain/cluster/$seedID"
    16  
    17  echo "Seed host name: $seedID"
    18  echo "My host name: $HOSTNAME"
    19  
    20  [ ! -d "$clusterDir/hc" ] && mkdir $clusterDir/hc
    21  echo "#!/bin/sh" >> $clusterDir/hc/$HOSTNAME 
    22  echo "echo defaultBehaviour. No test role found. " >> $clusterDir/hc/$HOSTNAME 
    23  echo "hc serve devchain" >> $clusterDir/hc/$HOSTNAME 
    24  chmod +x $clusterDir/hc/$HOSTNAME 
    25  
    26  cnys hc.sync.ready hc.sync.ready.$HOSTNAME
    27  
    28  sync post.up
    29  
    30  releaseTime=`date +%s-%N`
    31  echo "$HOSTNAME > starting hc at: $releaseTime"
    32  
    33  # this runs the template that was copied into the location
    34  #   default at time of writing is hc.testScenario.role.template
    35  $clusterDir/hc/$HOSTNAME
    36  
    37  cnys hc.sync.complete hc.sync.complete.$HOSTNAME