diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-08-22 11:02:40 +0200 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-08-22 11:02:40 +0200 |
commit | 55a7d75889507a9882c91f8c0a44ea9460a5d095 (patch) | |
tree | e4d40e8bdb76614317edbd6d07f1d226eb80bb39 /testing/postgresql/postgresql-initdb | |
parent | f23b8ed12499118d66340154fe8369623da3da34 (diff) | |
parent | 297a042ac9a7bbd2b18a9551f5fa4fe43faf53b2 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
core/rfkill/PKGBUILD
extra/libkgapi/PKGBUILD
extra/transmission/PKGBUILD
testing/grep/PKGBUILD
testing/grep/grep.install
Diffstat (limited to 'testing/postgresql/postgresql-initdb')
-rwxr-xr-x | testing/postgresql/postgresql-initdb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/testing/postgresql/postgresql-initdb b/testing/postgresql/postgresql-initdb deleted file mode 100755 index a691a83ff..000000000 --- a/testing/postgresql/postgresql-initdb +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -set -e - -. /etc/conf.d/postgresql - -# 2nd clause is necessary to prevent symlinking the directory to itself when it -# doesn't exist yet -if [ ! /var/lib/postgres -ef "$PGROOT" ] && [ /var/lib/postgres != "$PGROOT" ]; then - echo "Creating symlink /var/lib/postgres -> $PGROOT" - - # Remove /var/lib/postgres if empty dir, but not if symlink - if [ ! -L /var/lib/postgres ] && [ -d /var/lib/postgres ]; then - rmdir /var/lib/postgres - fi - - ln -sf "$PGROOT" /var/lib/postgres -fi - -PGDATA="$PGROOT/data" - -if [ ! -d "$PGDATA" ]; then - echo "Initializing database in $PGDATA" - - mkdir -p "$PGDATA" - chown -R postgres:postgres "$PGDATA" - - su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null - - if [ -f /etc/postgresql/postgresql.conf ]; then - ln -sf /etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf" - fi -fi |