1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00
awx/tools/scripts/awx-python
Christian Adams ec1e93cc69 Upgrade to postgres 10.6
- use awx-python in shebang in dev env
  - scl enable where needed for rhel7 & container installs
  - use scram-sha-256 pg user hashing by default
  - ensure psycopg2 is using the correct PG_CONFIG at build time for the right libpq version
2019-09-12 12:52:43 -04:00

20 lines
535 B
Bash
Executable File

#!/usr/bin/env bash
# Enable needed Software Collections, if installed
for scl in rh-python36 rh-postgresql10; do
if [ -f /etc/scl/prefixes/$scl ]; then
if [ -f `cat /etc/scl/prefixes/$scl`/$scl/enable ]; then
. `cat /etc/scl/prefixes/$scl`/$scl/enable
fi
fi
done
# Enable Tower virtualenv
for venv_path in /var/lib/awx/venv/awx /venv/awx; do
if [ -f $venv_path/bin/activate ]; then
. $venv_path/bin/activate
fi
done
# Run the requested Python command, using the interpreter from the path
exec python3 "$@"