awx/tools/scripts/awx-python
Bill Nottingham 871695ea5e Remove SCL python from awx-python
This really should be created at build time.
2020-03-09 15:51:56 -04:00

20 lines
523 B
Bash
Executable File

#!/usr/bin/env bash
# Enable needed Software Collections, if installed
for scl in 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 "$@"