mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-12 10:51:01 +01:00
Update 30-certs_keygen
This commit is contained in:
@@ -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=*"
|
||||
|
||||
Reference in New Issue
Block a user