Change cesium pods and duniter node ofr good one; Fix MY_PATH for symlink; Add jaklis to env in setup.sh

This commit is contained in:
poka 2021-12-08 11:12:51 +01:00
parent efed7354df
commit 9117def4b9
4 changed files with 19 additions and 7 deletions

View File

@ -2,9 +2,11 @@
DUNIKEY=
# Noeud Duniter
NODE=https://g1.librelois.fr/gva
NODE=https://duniter-g1.p2p.legal/gva
# Adresse du pod Cesium ou Gchange à utiliser
POD=https://g1.data.le-sou.org
POD="https://g1.data.e-is.pro"
#POD="https://g1.data.adn.life"
#POD=https://g1.data.le-sou.org
#POD=https://g1.data.duniter.fr
#POD=https://data.gchange.fr

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ __pycache__
*.dunikey
not4U
.vscode/settings.json

View File

@ -6,9 +6,9 @@ from shutil import copyfile
from dotenv import load_dotenv
from duniterpy.key import SigningKey
__version__ = "0.0.4"
__version__ = "0.0.5"
MY_PATH = os.path.realpath(os.path.dirname(sys.argv[0])) + '/'
MY_PATH = os.path.realpath(sys.argv[0]).replace('jaklis.py','')
# Get variables environment
if not os.path.isfile(MY_PATH + '.env'):
@ -19,11 +19,11 @@ load_dotenv(dotenv_path)
# Set global values (default parameters) , regarding variables environments
node = os.getenv('NODE')
if not node:
node="https://g1.librelois.fr/gva"
node="https://duniter-g1.p2p.legal/gva"
pod = os.getenv('POD')
if not pod:
pod="https://g1.data.le-sou.org"
pod="https://g1.data.e-is.pro"
destPubkey = False

View File

@ -1,5 +1,7 @@
#!/bin/bash
hasError=0
for i in gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel; do
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
[[ ! $j ]] && sudo apt update
@ -8,5 +10,12 @@ for i in gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel;
fi
done
pip3 install -r requirements.txt
pip3 install -r requirements.txt || hasError=1
chmod u+x jaklis.py
ln -sf $(realpath jaklis.py) /usr/local/bin/jaklis || hasError=1
if [[ hasError -eq 0 ]]; then
echo "Setup done. You can use 'jaklis' command, try it."
else
echo "An error has occurred"
fi