use spaces to indent

This commit is contained in:
Sameer Naik
2014-08-19 19:38:04 +05:30
parent 62c44a38e4
commit dc4d3963dc
2 changed files with 19 additions and 19 deletions
+3 -3
View File
@@ -2,9 +2,9 @@ FROM sameersbn/ubuntu:12.04.20140818
MAINTAINER sameer@damagehead.com
RUN apt-get update && \
apt-get install -y --no-install-recommends postgresql postgresql-client && \
rm -rf /var/lib/postgresql && \
rm -rf /var/lib/apt/lists/* # 20140818
apt-get install -y --no-install-recommends postgresql postgresql-client && \
rm -rf /var/lib/postgresql && \
rm -rf /var/lib/apt/lists/* # 20140818
ADD start /start
RUN chmod 755 /start
+16 -16
View File
@@ -20,26 +20,26 @@ EOF
# initialize PostgreSQL data directory
if [ ! -d /var/lib/postgresql/9.1/main ]; then
echo "Initializing database..."
PG_PASSWORD=$(pwgen -c -n -1 14)
echo "${PG_PASSWORD}" > /var/lib/postgresql/pwfile
sudo -u postgres -H /usr/lib/postgresql/9.1/bin/initdb \
--pgdata=/var/lib/postgresql/9.1/main --pwfile=/var/lib/postgresql/pwfile \
--username=postgres --encoding=unicode --auth=trust >/dev/null
echo "Initializing database..."
PG_PASSWORD=$(pwgen -c -n -1 14)
echo "${PG_PASSWORD}" > /var/lib/postgresql/pwfile
sudo -u postgres -H /usr/lib/postgresql/9.1/bin/initdb \
--pgdata=/var/lib/postgresql/9.1/main --pwfile=/var/lib/postgresql/pwfile \
--username=postgres --encoding=unicode --auth=trust >/dev/null
fi
if [ -f /var/lib/postgresql/pwfile ]; then
PG_PASSWORD=$(cat /var/lib/postgresql/pwfile)
echo "|------------------------------------------------------------------|"
echo "| PostgreSQL User: postgres, Password: ${PG_PASSWORD} |"
echo "| |"
echo "| To remove the PostgreSQL login credentials from the logs, please |"
echo "| make a note of password and then delete the file pwfile |"
echo "| from the data store. |"
echo "|------------------------------------------------------------------|"
PG_PASSWORD=$(cat /var/lib/postgresql/pwfile)
echo "|------------------------------------------------------------------|"
echo "| PostgreSQL User: postgres, Password: ${PG_PASSWORD} |"
echo "| |"
echo "| To remove the PostgreSQL login credentials from the logs, please |"
echo "| make a note of password and then delete the file pwfile |"
echo "| from the data store. |"
echo "|------------------------------------------------------------------|"
fi
echo "Starting PostgreSQL server..."
exec sudo -u postgres -H /usr/lib/postgresql/9.1/bin/postgres \
-D /var/lib/postgresql/9.1/main \
-c config_file=/etc/postgresql/9.1/main/postgresql.conf
-D /var/lib/postgresql/9.1/main \
-c config_file=/etc/postgresql/9.1/main/postgresql.conf