Skip to content

Commit

Permalink
Merge pull request #68 from EGA-archive/hotfix/bootstrap-pythonexec
Browse files Browse the repository at this point in the history
Using PYTHONEXEC consistently across the bootstrap scripts
  • Loading branch information
Dmytro Titov committed May 22, 2019
2 parents 13b2e00 + a0947ac commit cb25605
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deploy/bootstrap/defs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function generate_password {
fi
# Otherwise
local size=${1:-16} # defaults to 16 characters
${PYTHONEXEC:-python3.6} -c "import secrets,string;print(''.join(secrets.choice(string.ascii_letters + string.digits) for i in range(${size})))"
${PYTHONEXEC} -c "import secrets,string;print(''.join(secrets.choice(string.ascii_letters + string.digits) for i in range(${size})))"
}

function generate_mq_hash {
Expand Down
6 changes: 3 additions & 3 deletions deploy/bootstrap/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ exec 2>${PRIVATE}/.err

if [[ ${REAL_CEGA} != 'yes' ]]; then
# Reset the variables here
CEGA_CONNECTION_PARAMS=$(python -c "from urllib.parse import urlencode; \
CEGA_CONNECTION_PARAMS=$(${PYTHONEXEC} -c "from urllib.parse import urlencode; \
print(urlencode({ 'heartbeat': 0, \
'connection_attempts': 30, \
'retry_delay': 10, \
Expand Down Expand Up @@ -214,7 +214,7 @@ keyserver_endpoint = http://keys${HOSTNAME_DOMAIN}:8080/keys/retrieve/%s/private
EOF

# Local broker connection
MQ_CONNECTION_PARAMS=$(python -c "from urllib.parse import urlencode; \
MQ_CONNECTION_PARAMS=$(${PYTHONEXEC} -c "from urllib.parse import urlencode; \
print(urlencode({ 'heartbeat': 0, \
'connection_attempts': 30, \
'retry_delay': 10, \
Expand All @@ -227,7 +227,7 @@ MQ_CONNECTION_PARAMS=$(python -c "from urllib.parse import urlencode;
MQ_CONNECTION="amqps://${MQ_USER}:${MQ_PASSWORD}@mq${HOSTNAME_DOMAIN}:5671/%2F"

# Database connection
DB_CONNECTION_PARAMS=$(python -c "from urllib.parse import urlencode; \
DB_CONNECTION_PARAMS=$(${PYTHONEXEC} -c "from urllib.parse import urlencode; \
print(urlencode({ 'application_name': 'LocalEGA', \
'sslmode': 'verify-full', \
'sslcert': '/etc/ega/ssl.cert', \
Expand Down

0 comments on commit cb25605

Please sign in to comment.