migrate any existing host.cert/key to domain based host.cert/key

we don't remove the old one's yet since existing nginx config
might still be referencing them (not sure)
This commit is contained in:
Girish Ramakrishnan
2018-01-30 22:02:43 -08:00
parent be66d1ff4d
commit 7907dd5c4f

View File

@@ -172,6 +172,9 @@ if ! grep -q "^Restart=" /etc/systemd/system/multi-user.target.wants/nginx.servi
echo -e "\n[Service]\nRestart=always\n" >> /etc/systemd/system/multi-user.target.wants/nginx.service
systemctl daemon-reload
fi
# remove this migration after 1.10
[[ -f /etc/nginx/host.cert ]] && cp /etc/nginx/host.cert "/etc/nginx/${arg_admin_domain}.host.cert"
[[ -f /etc/nginx/host.key ]] && cp /etc/nginx/host.cert "/etc/nginx/${arg_admin_domain}.host.key"
systemctl start nginx
# bookkeep the version as part of data