Browse Source

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

master
poka 6 months ago
parent
commit
9117def4b9
  1. 6
      .env.template
  2. 1
      .gitignore
  3. 8
      jaklis.py
  4. 11
      setup.sh

6
.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

1
.gitignore vendored

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

8
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

11
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

Loading…
Cancel
Save