X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=postgresql.init;h=8f308171836413e5dd01472b7f7de22c59985606;hb=29679b393c068f763a47d412a1ed1952de396acd;hp=eb4b2ec5fe43114cd7bd094c0b5ec9dd65bc2c7b;hpb=35c12f8a045babc31faf502f400a9ce81b43b8fd;p=packages%2Fpostgresql.git diff --git a/postgresql.init b/postgresql.init index eb4b2ec..8f30817 100644 --- a/postgresql.init +++ b/postgresql.init @@ -21,10 +21,10 @@ cd / PG_INIT_LOCALE=C # Get service config -if [ -f /etc/sysconfig/postgresql9.6 ]; then - . /etc/sysconfig/postgresql9.6 +if [ -f /etc/sysconfig/postgresql-@pgsqlversion@ ]; then + . /etc/sysconfig/postgresql-@pgsqlversion@ else - nls "Error: %s not found" /etc/sysconfig/postgresql9.6 + nls "Error: %s not found" /etc/sysconfig/postgresql-@pgsqlversion@ nls " PostgreSQL can't be run." exit 1 fi @@ -106,11 +106,11 @@ pgsubsys() { for pgdir in $PG_DB_CLUSTERS; do pgstatus "$pgdir" if [ "$PG_STATUS" = "running" ]; then - touch /var/lock/subsys/postgresql9.6 + touch /var/lock/subsys/postgresql-@pgsqlversion@ return fi done - rm -f /var/lock/subsys/postgresql9.6 + rm -f /var/lock/subsys/postgresql-@pgsqlversion@ } #