From b7dc137a804d33ce2dfcf4405524926144f2e418 Mon Sep 17 00:00:00 2001 From: poka Date: Wed, 11 Dec 2019 23:01:17 +0000 Subject: [PATCH] Fix playsms install --- .install/1-install_requirements.sh | 5 +++-- .install/2-configure_ipfs_layer.sh | 1 + .install/4-install_playsms.sh | 1 + shell/bad.nodes.txt | 1 + shell/checknodes.sh | 5 +++-- shell/good.nodes.txt | 4 +++- shell/nodes.txt | 12 ++++++------ silkaj/src/constants.py | 2 +- 8 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.install/1-install_requirements.sh b/.install/1-install_requirements.sh index ee7b58c..07bee41 100755 --- a/.install/1-install_requirements.sh +++ b/.install/1-install_requirements.sh @@ -6,12 +6,13 @@ isARM=$(uname -a | grep arm) # Basics sudo apt update -sudo apt install curl jq zip unzip htop tree -y +sudo apt install curl jq zip unzip htop tree ntpdate -y # Silkaj + Duniterpy libsodium=$(sudo apt search libsodium | grep -v "header" | grep "Network communication" -B1 | head -n1 | awk -F '/' '{ print $1 }') sudo apt install python3-pip $libsodium -y -pip3 install silkaj +pip3 install duniterpy +pip3 install silkaj --user # Install IPFS [[ -f /usr/local/bin/ipfs ]] && sudo service ipfs stop diff --git a/.install/2-configure_ipfs_layer.sh b/.install/2-configure_ipfs_layer.sh index b17c3ef..b1b3981 100755 --- a/.install/2-configure_ipfs_layer.sh +++ b/.install/2-configure_ipfs_layer.sh @@ -42,6 +42,7 @@ ipfs bootstrap rm --all ipfs bootstrap add /ip6/fe80::207:cbff:fe0b:75bb/tcp/4001/ipfs/QmSX7gFRPHui5A2DWFk2VmBvq6hynj2hubhJLQAwPWe4Lh ipfs bootstrap add /ip4/51.15.2.211/tcp/4001/ipfs/QmSX7gFRPHui5A2DWFk2VmBvq6hynj2hubhJLQAwPWe4Lh ### ADD NEW SWARM LEADERS SERVER HERE ### +cp $MY_PATH/templates/swarm.key ~/.ipfs/ # ALLOW REMOTE SSH CONNECTION FROM rec OR onelove (For swarm.key & keystore exchange ) # ADD SSH ADMIN/SUPPORT USERS $(cat .ssh/id_rsa.pub) diff --git a/.install/4-install_playsms.sh b/.install/4-install_playsms.sh index d010369..91c7a89 100755 --- a/.install/4-install_playsms.sh +++ b/.install/4-install_playsms.sh @@ -55,6 +55,7 @@ sudo chmod u+x $MY_PATH/playsms/install-playsms.sh cd $MY_PATH/playsms sed -i "s/read /confirm=y; #read /g" install-playsms.sh sudo ./install-playsms.sh +sudo sed -i 's/['ishttps'] = false;/['ishttps'] = true;/g' /var/www/playsms/config.php cd $MY_PATH ##kopa sudo rm -rf playsms diff --git a/shell/bad.nodes.txt b/shell/bad.nodes.txt index 4d45c3e..b810579 100644 --- a/shell/bad.nodes.txt +++ b/shell/bad.nodes.txt @@ -1 +1,2 @@ duniter.moul.re:443 +duniter-g1.p2p.legal:443 diff --git a/shell/checknodes.sh b/shell/checknodes.sh index ac41ae5..1195192 100755 --- a/shell/checknodes.sh +++ b/shell/checknodes.sh @@ -5,7 +5,7 @@ # Version: 0.1 # License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) ################################################################################ -# Checks the current block number of nodes.txt (is run in parallel) and output random (from last synchronized) node +# Checks the current block number of nodes.txt (is run in parallel) and output random (from last synchronized) node # pip3 install duniterpy # pip3 install silkaj --user @@ -63,7 +63,8 @@ BAN=$1 if [[ "$BAN" == "BAN" ]]; then # Get actual Duniter node used by silkaj SERVER=$(cat ./silkaj/src/constants.py | grep G1_DEFAULT_ENDPOINT | awk '{print $3}' | sed s/\"\,//g | sed s/\"//g) - echo $SERVER:443 >> ./shell/bad.nodes.txt + [[ ! $(grep $SERVER:443 shell/bad.nodes.txt) ]] && echo $SERVER:443 >> shell/bad.nodes.txt + sed -i "/$SERVER:443/d" ./shell/good.nodes.txt echo "$SERVER:443 IS NOW in ./shell/bad.nodes.txt" fi diff --git a/shell/good.nodes.txt b/shell/good.nodes.txt index b38fa55..c3a8035 100644 --- a/shell/good.nodes.txt +++ b/shell/good.nodes.txt @@ -1,5 +1,7 @@ +duniter-g1.p2p.legal:443 g1.duniter.fr:443 +g1.duniter.inso.ovh:443 g1.duniter.org:443 g1.le-sou.org:443 g1.monnaielibreoccitanie.org:443 -duniter-g1.p2p.legal:443 +g1.presles.fr:443 diff --git a/shell/nodes.txt b/shell/nodes.txt index dac4a03..bd8c901 100644 --- a/shell/nodes.txt +++ b/shell/nodes.txt @@ -1,9 +1,9 @@ -g1.le-sou.org:443 -follow.the.white-rabbit.net:443 -duniter.moul.re:443 -g1.monnaielibreoccitanie.org:443 g1.duniter.inso.ovh:443 g1.duniter.fr:443 -g1.presles.fr:443 -g1.duniter.org:443 +g1.monnaielibreoccitanie.org:443 +g1.le-sou.org:443 monit.g1.nordstrom.duniter.org:443 +g1.duniter.org:443 +g1.presles.fr:443 +duniter.moul.re:443 +duniter-g1.p2p.legal:443 diff --git a/silkaj/src/constants.py b/silkaj/src/constants.py index 3612867..b49f415 100644 --- a/silkaj/src/constants.py +++ b/silkaj/src/constants.py @@ -2,4 +2,4 @@ SILKAJ_VERSION = "silkaj 0.5.0" NO_MATCHING_ID = "No matching identity" G1_SYMBOL = "Ğ1" GTEST_SYMBOL = "ĞTest" -G1_DEFAULT_ENDPOINT = "duniter-g1.p2p.legal", "443" +G1_DEFAULT_ENDPOINT = "duniter.moul.re", "443"