diff --git a/plugins/postgresql/index.py b/plugins/postgresql/index.py index 2f941bc5d..63643bc2a 100755 --- a/plugins/postgresql/index.py +++ b/plugins/postgresql/index.py @@ -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 diff --git a/plugins/postgresql/init.d/postgresql.service.tpl b/plugins/postgresql/init.d/postgresql.service.tpl index 0eedaa417..1dfaadd73 100644 --- a/plugins/postgresql/init.d/postgresql.service.tpl +++ b/plugins/postgresql/init.d/postgresql.service.tpl @@ -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