defined /etc/postgresql/certs as the mountpoint to install SSL key and certificate

This commit is contained in:
Sameer Naik
2015-11-26 20:41:47 +05:30
parent 7eeda81f1e
commit 5f6024062f
3 changed files with 13 additions and 1 deletions
+10
View File
@@ -59,6 +59,15 @@ create_datadir() {
chown -R ${PG_USER}:${PG_USER} ${PG_HOME}
}
create_certdir() {
echo "Initializing certdir..."
mkdir -p ${PG_CERTDIR}
[[ -f ${PG_CERTDIR}/server.crt ]] && chmod 0644 ${PG_CERTDIR}/server.crt
[[ -f ${PG_CERTDIR}/server.key ]] && chmod 0640 ${PG_CERTDIR}/server.key
chmod 0755 ${PG_CERTDIR}
chown -R root:${PG_USER} ${PG_CERTDIR}
}
create_logdir() {
echo "Initializing logdir..."
mkdir -p ${PG_LOGDIR}
@@ -327,6 +336,7 @@ if [[ -z ${1} ]]; then
locale_gen
create_datadir
create_certdir
create_logdir
create_rundir