#!/bin/bash ## Postgresql needs to be able to read these files as user "postgres". ## So they must be copied into it's config. dir. and chown'ed. verbose=1 if (( verbose )); then echo "Running $0" v_cp="-v" v_cw="-c" fi cp $v_cp /etc/letsencrypt/live/m1.almanet.ch/{fullchain,privkey}.pem /etc/postgresql/9.6/main/ chown $v_cw postgres:postgres /etc/postgresql/9.6/main/*.pem # Reload is not enough! Restart is needed. # Will not be needed from version 10 systemctl restart postgresql