This commit is contained in:
parent
24ca8cfde3
commit
a65a484bf1
|
|
@ -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…
Reference in New Issue