fix setup and no env DUNITER #21
|
@ -17,9 +17,12 @@ dotenv_path = join(dirname(__file__),MY_PATH + '.env')
|
||||||
load_dotenv(dotenv_path)
|
load_dotenv(dotenv_path)
|
||||||
|
|
||||||
# Set global values (default parameters) , regarding variables environments
|
# Set global values (default parameters) , regarding variables environments
|
||||||
node = os.getenv('DUNITER') + '/gva'
|
duniter = os.getenv('DUNITER')
|
||||||
if not node:
|
|
||||||
node="https://g1.librelois.fr/gva"
|
if not duniter:
|
||||||
|
node = "https://g1.librelois.fr/gva"
|
||||||
|
else:
|
||||||
|
node = os.getenv('DUNITER') + '/gva'
|
||||||
|
|
||||||
pod = os.getenv('ESNODE')
|
pod = os.getenv('ESNODE')
|
||||||
if not pod:
|
if not pod:
|
||||||
|
|
8
setup.sh
8
setup.sh
|
@ -2,13 +2,17 @@
|
||||||
|
|
||||||
hasError=0
|
hasError=0
|
||||||
|
|
||||||
for i in gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel; do
|
if [ -f "/etc/arch-release" ]; then
|
||||||
|
echo '! jaklis needs gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel'
|
||||||
|
elif [ -f "/etc/lsb-release" ]; then # ubuntu
|
||||||
|
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
|
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||||
[[ ! $j ]] && sudo apt update
|
[[ ! $j ]] && sudo apt update
|
||||||
sudo apt install -y $i
|
sudo apt install -y $i
|
||||||
j=1
|
j=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
pip3 install -r requirements.txt || hasError=1
|
pip3 install -r requirements.txt || hasError=1
|
||||||
chmod u+x jaklis.py
|
chmod u+x jaklis.py
|
||||||
|
|
Loading…
Reference in New Issue