From ee296f056e89fe6d84479bc43c7dad5ffda640e2 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 21 Sep 2021 20:25:31 +0200 Subject: [PATCH] Update 30-certs_keygen --- nextcloud/root/etc/cont-init.d/30-certs_keygen | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nextcloud/root/etc/cont-init.d/30-certs_keygen b/nextcloud/root/etc/cont-init.d/30-certs_keygen index 6e089304f..b788ea41c 100644 --- a/nextcloud/root/etc/cont-init.d/30-certs_keygen +++ b/nextcloud/root/etc/cont-init.d/30-certs_keygen @@ -8,12 +8,15 @@ if bashio::config.has_value 'certfile'; then KEYFILE=$(bashio::config 'keyfile') #Check if files exist - [ ! -f /ssl/$CERTFILE ] && bashio::log.fatal "Certificate /ssl/$CERTFILE not found" && exit 1 - [ ! -f /ssl/$KEYFILE ] && bashio::log.fatal "Certificate /ssl/$KEYFILE not found" && exit 1 + [ ! -f /ssl/$CERTFILE ] && bashio::log.fatal "... Certificate /ssl/$CERTFILE not found" && exit 1 + [ ! -f /ssl/$KEYFILE ] && bashio::log.fatal "... Certificate /ssl/$KEYFILE not found" && exit 1 #Sets certificates sed -i "s|nextcloud/keys/cert.crt|$CERTFILE|g" /defaults/default sed -i "s|nextcloud/keys/cert.key|$KEYFILE|g" /defaults/default + + bashio::log.info "... done" + else bashio::log.info "No ssl certificates set. Auto generating ones." SUBJECT="/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*"