Ship with pre-configured paths that can work in both Server and Desktop modes out of the box. Fixes #2662

Ship the web code using server mode with appropriate paths by default and enable the runtime to override the mode, and force into desktop changing the appropriate paths to user-specific ones.

Note that this change will likely cause more advanced users to have to tweak configs.

RPMs will also need changes to create /var/lib/pgadmin and /var/log/pgadmin, owned by the webserver account.
This commit is contained in:
Dave Page
2017-08-25 10:54:28 +01:00
parent fb9eee47bd
commit f195b18f2d
4 changed files with 89 additions and 42 deletions

View File

@@ -272,9 +272,10 @@ void Server::run()
return;
}
// Set the port number
// Set the port number and key, and force SERVER_MODE off.
PyRun_SimpleString(QString("PGADMIN_PORT = %1").arg(m_port).toLatin1());
PyRun_SimpleString(QString("PGADMIN_KEY = '%1'").arg(m_key).toLatin1());
PyRun_SimpleString(QString("SERVER_MODE = False").toLatin1());
// Run the app!
QByteArray m_appfile_utf8 = m_appfile.toUtf8();