Add duniter curl testing
This commit is contained in:
parent
3711893827
commit
b531ce2f4d
|
@ -126,7 +126,7 @@ g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://piwik.p2p.l
|
|||
|
||||
<br>Application également disponible <a href="https://cesium.app" target="cesium">en téléchargement</a>
|
||||
|
||||
<br><br>Ajoute une image et <b>indique tes coordonnées géographiques</b>, nous pourons alors te prévenir lorqu'un ami ou une ressource libre est proche
|
||||
<br><br>Ajoute une image et <b>indique tes coordonnées géographiques</b>, nous pourrons alors te prévenir lorqu'un ami ou une ressource libre est proche
|
||||
<br><br>
|
||||
<h4><a href="/#/app/wot/map" onclick="javascript:event.target.port=10030;event.target.protocol='http:';" target="cesium">Rejoindre le réseau Cesium</a> !</h4></p>
|
||||
</div>
|
||||
|
|
|
@ -110,10 +110,18 @@ do
|
|||
done
|
||||
|
||||
longchain=$(ls -S $DIR/chains/ | head -n 1)
|
||||
cp $DIR/chains/$longchain $DIR/good.nodes.txt
|
||||
# WRITE OUT shuffle Duniter Node Sync with longest chain
|
||||
result=$(shuf -n 1 $DIR/good.nodes.txt)
|
||||
[[ ! $result ]] && result="duniter-g1.p2p.legal:443"
|
||||
cp $DIR/chains/$longchain $DIR/good.nodes.txt
|
||||
|
||||
## TEST if server is really running Duniter
|
||||
Dtest=""; loop=0
|
||||
while [[ $Dtest != "duniter" ]]; do
|
||||
result=$(shuf -n 1 $DIR/good.nodes.txt)
|
||||
Dtest=$(curl -s https://$result | jq -r .duniter.software)
|
||||
((loop++))
|
||||
[[ $loop -eq 4 ]] && result="duniter-g1.p2p.legal:443" && break
|
||||
done
|
||||
|
||||
echo "$result" > /tmp/zen/current.duniter
|
||||
|
||||
echo $result
|
||||
|
|
Loading…
Reference in New Issue