diff --git a/.env.template b/.env.template index 462b319..1aed83f 100755 --- a/.env.template +++ b/.env.template @@ -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 diff --git a/.gitignore b/.gitignore index 357236c..5a2385c 100755 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__ *.dunikey not4U +.vscode/settings.json diff --git a/jaklis.py b/jaklis.py index a4c2b0c..9120bb9 100755 --- a/jaklis.py +++ b/jaklis.py @@ -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 diff --git a/setup.sh b/setup.sh index 222e4ba..0c9a850 100755 --- a/setup.sh +++ b/setup.sh @@ -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