This commit is contained in:
parent
0d09cf6ad4
commit
1bf2dc2738
|
|
@ -0,0 +1,10 @@
|
|||
# PostgreSQL Client Authentication Configuration File
|
||||
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
# "local" is for Unix domain socket connections only
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all ::1/128 trust
|
||||
local replication all trust
|
||||
host replication all 127.0.0.1/32 trust
|
||||
host replication all ::1/128 trust
|
||||
|
|
@ -27,4 +27,6 @@ log_destination = 'stderr'
|
|||
log_directory = '{$APP_PATH}/logs'
|
||||
log_filename = 'postgresql-%Y-%m-%d.log'
|
||||
log_statement = all
|
||||
log_rotation_age = 7d
|
||||
log_rotation_size = 100MB
|
||||
log_min_duration_statement = 5000
|
||||
|
|
|
|||
|
|
@ -188,12 +188,20 @@ def initDreplace(version=''):
|
|||
init_pl = conf_dir + "/init.pl"
|
||||
if not os.path.exists(init_pl):
|
||||
mw.writeFile(init_pl, 'ok')
|
||||
|
||||
# postgresql.conf
|
||||
pg_conf = conf_dir + '/data/postgresql.conf'
|
||||
tpl = getPluginDir() + '/conf/postgresql.conf'
|
||||
content = mw.readFile(tpl)
|
||||
content = contentReplace(content)
|
||||
mw.writeFile(pg_conf, content)
|
||||
|
||||
# pg_hba.conf
|
||||
tpl = getPluginDir() + '/conf/pg_hba.conf'
|
||||
pg_hba_conf = conf_dir + '/data/pg_hba.conf'
|
||||
content = mw.readFile(tpl)
|
||||
mw.writeFile(pg_hba_conf, content)
|
||||
|
||||
logfile = runLog()
|
||||
if not os.path.exists(logfile):
|
||||
mw.writeFile(logfile, '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue