mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 10:10:19 -06:00
Ensure PGADMIN_DEFAULT_EMAIL looks sane when initialising a container deployment. Fixes #6227
This commit is contained in:
parent
544483ae1f
commit
cafd2af96d
@ -23,3 +23,4 @@ Bug fixes
|
||||
| `Issue #5628 <https://redmine.postgresql.org/issues/5628>`_ - Remove the "launch now" option in the Windows installer, as UAC could cause it to run as an elevated user.
|
||||
| `Issue #6018 <https://redmine.postgresql.org/issues/6018>`_ - Fixed encoding issue when database encoding set to SQL_ASCII and name of the column is in ASCII character.
|
||||
| `Issue #6159 <https://redmine.postgresql.org/issues/6159>`_ - Ensure that the user should be able to kill the session from Dashboard if the user has a 'pg_signal_backend' role.
|
||||
| `Issue #6227 <https://redmine.postgresql.org/issues/6227>`_ - Ensure PGADMIN_DEFAULT_EMAIL looks sane when initialising a container deployment.
|
@ -23,7 +23,13 @@ fi
|
||||
|
||||
if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
|
||||
if [ -z "${PGADMIN_DEFAULT_EMAIL}" -o -z "${PGADMIN_DEFAULT_PASSWORD}" ]; then
|
||||
echo 'You need to specify PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD environment variables'
|
||||
echo 'You need to define the PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD environment variables.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ${PGADMIN_DEFAULT_EMAIL} | grep -E "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "'${PGADMIN_DEFAULT_EMAIL}' does not appear to be a valid email address. Please reset the PGADMIN_DEFAULT_EMAIL environment variable and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user