had to manually fix postgresql script
This commit is contained in:
parent
75f1af5058
commit
0dcce2ac18
1 changed files with 8 additions and 2 deletions
|
|
@ -8,13 +8,19 @@ if [ "$PGROOT" != "/var/lib/postgres" ]; then
|
|||
ln -sf "$PGROOT" /var/lib/postgres
|
||||
fi
|
||||
|
||||
if [ ! -d "/var/run/postgresql" ]; then
|
||||
echo "creating directory /var/run/postgresql"
|
||||
|
||||
mkdir -p "/var/run/postgresql"
|
||||
chown -R postgres:postgres "/var/run/postgresql"
|
||||
fi
|
||||
|
||||
if [ ! -d "$PGDATA" ]; then
|
||||
echo "Initializing database in $PGDATA"
|
||||
|
||||
mkdir -p "$PGDATA"
|
||||
mkdir -p "$PGDATA"
|
||||
chown -R postgres:postgres "$PGDATA"
|
||||
chmod 777 "$PGDATA"
|
||||
chmod 0700 "$PGDATA"
|
||||
su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null
|
||||
|
||||
if [ -f /etc/postgresql/postgresql.conf ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue