From 7a848289348f725e20390765505937f01428b4bc Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 22 Jan 2021 19:26:17 +0100 Subject: [PATCH] Update 30-keygen --- nextcloud/root/etc/cont-init.d/30-keygen | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nextcloud/root/etc/cont-init.d/30-keygen b/nextcloud/root/etc/cont-init.d/30-keygen index 463aae896..d3e105507 100644 --- a/nextcloud/root/etc/cont-init.d/30-keygen +++ b/nextcloud/root/etc/cont-init.d/30-keygen @@ -6,13 +6,15 @@ if [[ -f /ssl/privkey.pem && -f /ssl/fullchain.pem ]]; then echo "using pem keys found in /ssl" cp /ssl/privkey.pem /ssl/nextcloud/keys/cert.key cp /ssl/fullchain.pem /ssl/nextcloud/keys/cert.crt -else + elif [[ -f /ssl/cert.key && -f /ssl/cert.crt ]]; then echo "using crt keys found in /ssl" cp /ssl/cert.key /ssl/nextcloud/keys/cert.key cp /ssl/cert.crt /ssl/nextcloud/keys/cert.crt + elif [[ -f /ssl/nextcloud/keys/cert.key && -f /ssl/nextcloud/keys/cert.crt ]]; then echo "using keys found in /ssl/nextcloud/keys" + else echo "generating self-signed keys in /ssl/nextcloud/keys, you can replace these with your own keys if required" openssl req -new -x509 -days 3650 -nodes -out /ssl/nextcloud/keys/cert.crt -keyout /ssl/nextcloud/keys/cert.key -subj "$SUBJECT"