postgresqls:Fixed server running issue and file paths
This commit is contained in:
@@ -12,4 +12,5 @@ def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
for i in ["LANG", "LANGUAGE", "LC_ALL"]:
|
||||
os.environ[i] = "en_US.UTF-8"
|
||||
|
||||
os.system('/bin/su postgres -s /bin/sh -p -c "/usr/bin/initdb --pgdata /var/lib/postgresql/data"')
|
||||
os.system('/bin/su postgres -s /bin/sh -p -c "/usr/bin/initdb --pgdata /var/lib/postgresql/data"')
|
||||
os.system('/bin/su postgres -s /bin/sh -p -c "/usr/bin/pg_ctl --pgdata -l logfile start"')
|
||||
|
||||
@@ -19,7 +19,7 @@ def check_postgresql():
|
||||
fail(MSG_ERR_PGSQLNOTINST)
|
||||
|
||||
PIDFILE = "%s/postmaster.pid" % config.get("PGDATA", "/var/lib/postgresql/data")
|
||||
|
||||
#pg_ctl
|
||||
@synchronized
|
||||
def start():
|
||||
check_postgresql()
|
||||
@@ -42,4 +42,4 @@ def reload():
|
||||
donotify=True)
|
||||
|
||||
def status():
|
||||
return isServiceRunning(PIDFILE)
|
||||
return isServiceRunning(PIDFILE)
|
||||
|
||||
Reference in New Issue
Block a user