Mercurial > gemma
diff pkg/config/config.go @ 4624:209b10f7bb2c geoserver_sql_views
Add config for GeoServer database session startup SQL
Prepended to setting the role in order to avoid any configuration
overwriting it.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 09 Oct 2019 18:47:13 +0200 |
parents | 317d176ef38c |
children | 0919946f624b |
line wrap: on
line diff
--- a/pkg/config/config.go Wed Oct 09 16:40:18 2019 +0200 +++ b/pkg/config/config.go Wed Oct 09 18:47:13 2019 +0200 @@ -103,6 +103,14 @@ // rebooting. func GeoServerClean() bool { return viper.GetBool("geoserver-clean") } +// GeoServerStartupSQL can be used to add SQL commands to GeoServers database +// session start script. See +// https://docs.geoserver.org/stable/en/user/data/database/sqlsession.html +// Note that the commands will be executed as the user configured as 'db-user'. +func GeoServerStartupSQL() string { + return viper.GetString("geoserver-startup-sql") +} + // TmpDir is the path where to store temporary files. // If left empty the system default for temporary files is used. func TmpDir() string { return viper.GetString("tmp-dir") }