Skip to content
Snippets Groups Projects
Verified Commit 0d2e6e50 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

postgres: Only copy key files that exist

parent 9a7f5822
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,10 @@ su - postgres -c 'chattr -f +C /var/lib/postgres/data' || :
su - postgres -c 'initdb --locale en_US.UTF-8 -E UTF8 -D /var/lib/postgres/data'
vimdiff /var/lib/postgres/{data,data-$FROM_VERSION}/pg_hba.conf
vimdiff /var/lib/postgres/{data,data-$FROM_VERSION}/postgresql.conf
cp -avxt /var/lib/postgres/data /var/lib/postgres/data-$FROM_VERSION/{fullchain,chain,privkey}.pem
for f in {fullchain,chain,privkey}.pem; do
[[ -e $f ]] || continue
cp -avx /var/lib/postgres/data-$FROM_VERSION/$f /var/lib/postgres/data/$f
done
systemctl stop postgresql.service
su - postgres -c "pg_upgrade -b /opt/pgsql-$FROM_VERSION/bin/ -B /usr/bin/ \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment