pull/156/head
midoks 3 years ago
parent 24ca8cfde3
commit a65a484bf1
  1. 2
      plugins/postgresql/index.py
  2. 4
      plugins/postgresql/init.d/postgresql.service.tpl

@ -258,7 +258,7 @@ def initPgData():
if not os.path.exists(serverdir + '/data'):
cmd = serverdir + '/bin/initdb -D ' + serverdir + "/data"
if not mw.isAppleSystem():
cmd = "su - postgres -c \"" + serverdir + "/bin/initdb -D \""
cmd = "su - postgres -c \"" + cmd + "\""
# print(cmd)
mw.execShell(cmd)
return False

@ -4,8 +4,8 @@ After=network.target
[Service]
Type=forking
User=postgresql
Group=postgresql
User=postgres
Group=postgres
WorkingDirectory={$APP_PATH}
ExecStart={$APP_PATH}/bin/pg_ctl start -D {$APP_PATH}/data
ExecReload={$APP_PATH}/bin/pg_ctl restart -D {$APP_PATH}/data

Loading…
Cancel
Save