diff --git a/README.md b/README.md index 59e6c95..8d01976 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ DECA's Carbon Credits OrbitDB Code and configs, everything you need for setting **IMPORTANT: Please verify that the database address matches the smart contract address** -# OrbitDB4CC +# CarbonCreditsBacklog

@@ -143,8 +143,8 @@ OrbitDB is a **serverless, distributed, peer-to-peer database**. OrbitDB uses [I **Clone the repo** ```sh - $ git clone https://gitlab.com/deca-currency/decascarboncreditsbacklog.git - $ cd orbitdb4cc + $ git clone https://gitlab.com/deca-currency/carboncreditsbacklog.git + $ cd carboncreditsbacklog ``` **Install the dependencies:** @@ -220,7 +220,7 @@ that holds this repository and that runs the orbitdb. *Append the following line at the end of the editor and write it* ```sh -0,5,10,15,20,25,30,35,40,45,50,55 * * * * sleep 28 ; /home/nodemaster/orbitdb4cc/connectNodes.sh >> /tmp/NodeStatus.log 2>&1 & +0,5,10,15,20,25,30,35,40,45,50,55 * * * * sleep 28 ; /home/nodemaster/carboncreditsbacklog/connectNodes.sh >> /tmp/NodeStatus.log 2>&1 & ``` **NOTE: in this example the path is nodemaster user directory, you should change it with your username and the path to the script connectNodes.sh** @@ -256,8 +256,8 @@ connect QmZL1otpiCzWMEJTHXbQ5Hb4aFE7TKLjAuuBAAet1WAgtD success Description=Public Node Updater [Service] -WorkingDirectory=/home/nodemaster/orbitdb4cc/ -ExecStart=/usr/local/bin/node /home/nodemaster/orbitdb4cc/index.js +WorkingDirectory=/home/nodemaster/carboncreditsbacklog/ +ExecStart=/usr/local/bin/node /home/nodemaster/carboncreditsbacklog/index.js User=nodemaster Restart=always LimitNOFILE=10240 @@ -268,9 +268,9 @@ WantedBy=multi-user.target ``` **NOTE: in this example user that runs ipfs, node and orbitdb instance is nodemaster, also the node location is at /usr/local/bin/node** -**NOTE1: set WorkingDirectory where is the repository, for this example /home/nodemaster/orbitdb4cc/** +**NOTE1: set WorkingDirectory where is the repository, for this example /home/nodemaster/carboncreditsbacklog/** -**NOTE2: set where is index.js mostly in the repository as follow path to node path, for this example /home/nodemaster/orbitdb4cc/index.js** +**NOTE2: set where is index.js mostly in the repository as follow path to node path, for this example /home/nodemaster/carboncreditsbacklog/index.js** > Enable the service diff --git a/connectNodes.sh b/connectNodes.sh index 76af5db..7dfdbdf 100755 --- a/connectNodes.sh +++ b/connectNodes.sh @@ -1,6 +1,6 @@ #!/bin/bash -node0=`host node0.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node0}/tcp/4001/ipfs/Qmd4Cv2fNwixP6cabEnTVFkF57GUGD6VBEcDhUkqHPG4X9" -node2=`host node2.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node2}/tcp/4001/ipfs/QmfBASmqe3Az9AUjCxx3dtomSmbZEiJCsXusPxznjNnjU5" -node4=`host node4.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node4}/tcp/4001/ipfs/QmQBAsbA49q7QrKhetJpbo5gKxQQiL6sxVXCep5skmuHsq" -node5=`host node5.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node5}/tcp/4001/ipfs/QmZL1otpiCzWMEJTHXbQ5Hb4aFE7TKLjAuuBAAet1WAgtD" +node0=`host node0.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node0}/tcp/4001/ipfs/Qmd4Cv2fNwixP6cabEnTVFkF57GUGD6VBEcDhUkqHPG4X9" +node2=`host node2.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node2}/tcp/4001/ipfs/QmfBASmqe3Az9AUjCxx3dtomSmbZEiJCsXusPxznjNnjU5" +node4=`host node4.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node4}/tcp/4001/ipfs/QmQBAsbA49q7QrKhetJpbo5gKxQQiL6sxVXCep5skmuHsq" +node5=`host node5.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node5}/tcp/4001/ipfs/QmZL1otpiCzWMEJTHXbQ5Hb4aFE7TKLjAuuBAAet1WAgtD" diff --git a/services/publicNode.service b/services/publicNode.service index 49f6452..8866ecd 100644 --- a/services/publicNode.service +++ b/services/publicNode.service @@ -2,8 +2,8 @@ Description=Public Node Updater [Service] -WorkingDirectory=/home/nodemaster/orbitdb4cc/ -ExecStart=/usr/local/bin/node /home/nodemaster/orbitdb4cc/index.js +WorkingDirectory=/home/nodemaster/carboncreditsbacklog/ +ExecStart=/usr/local/bin/node /home/nodemaster/carboncreditsbacklog/index.js User=nodemaster Restart=always LimitNOFILE=10240