Skip to content

Commit

Permalink
Switch to using /etc/pki/tls for the certificate source
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Nov 1, 2021
1 parent b4634c4 commit f1ccfe0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions container-assets/pre-start.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

if [ ! -f /opt/app-root/src/certificates/server.key ]; then
if [ ! -f /etc/pki/tls/private/server.key ]; then
echo "Skipping SSL setup, key not found."
else
cp /opt/app-root/src/certificates/server.crt /var/lib/pgsql/data/userdata/server.crt
cp /opt/app-root/src/certificates/server.key /var/lib/pgsql/data/userdata/server.key
cp /etc/pki/tls/certs/server.crt /var/lib/pgsql/data/userdata/server.crt
cp /etc/pki/tls/private/server.key /var/lib/pgsql/data/userdata/server.key

# Postgresql server will reject key files with liberal permissions
chmod og-rwx /var/lib/pgsql/data/userdata/server.key
Expand Down

0 comments on commit f1ccfe0

Please sign in to comment.