mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Administer pgAdmin Users and Preferences Using the Command Line Interface (CLI). #2483
This commit is contained in:
@@ -70,9 +70,9 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
|
||||
# When running in Desktop mode, no user is created
|
||||
# so we have to import servers anonymously
|
||||
if [ "${PGADMIN_CONFIG_SERVER_MODE}" = "False" ]; then
|
||||
/venv/bin/python3 /pgadmin4/setup.py --load-servers "${PGADMIN_SERVER_JSON_FILE}"
|
||||
/venv/bin/python3 /pgadmin4/setup.py load-servers "${PGADMIN_SERVER_JSON_FILE}"
|
||||
else
|
||||
/venv/bin/python3 /pgadmin4/setup.py --load-servers "${PGADMIN_SERVER_JSON_FILE}" --user "${PGADMIN_DEFAULT_EMAIL}"
|
||||
/venv/bin/python3 /pgadmin4/setup.py load-servers "${PGADMIN_SERVER_JSON_FILE}" --user "${PGADMIN_DEFAULT_EMAIL}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -72,7 +72,7 @@ fi
|
||||
|
||||
# Run setup script first:
|
||||
echo "Creating configuration database..."
|
||||
if ! /usr/pgadmin4/venv/bin/python3 /usr/pgadmin4/web/setup.py;
|
||||
if ! /usr/pgadmin4/venv/bin/python3 /usr/pgadmin4/web/setup.py setup-db;
|
||||
then
|
||||
echo "Error setting up server mode. Please examine the output above."
|
||||
exit 1
|
||||
|
||||
@@ -100,7 +100,8 @@ setup(
|
||||
},
|
||||
|
||||
entry_points={
|
||||
'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main'],
|
||||
'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main',
|
||||
'pgadmin4-cli=pgadmin4.setup:main'],
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user