Created
January 21, 2016 17:57
-
-
Save twonds/b2f71418d17e09119259 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PGSQL_DIR=/usr/local/pgsql | |
export PGDATA=${PGSQL_DIR}/data | |
if [ ! -e ${PGDATA}/PG_VERSION ] | |
then | |
initdb -D ${PGDATA} | |
fi | |
echo ${PGSQL_DIR} | |
postgres -D ${PGDATA} > ${PGSQL_DIR}/logfile 2>&1 & | |
echo $! > ${PGSQL_DIR}/pg.pid | |
cat ${PGSQL_DIR}/pg.pid | |
cat ${PGSQL_DIR}/logfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment