Files
hassio-addons/nextcloud/root/etc/cont-init.d/30-keygen
Alexandre 7ddfe1a147 A
2021-01-22 18:55:12 +01:00

13 lines
674 B
Plaintext

#!/usr/bin/with-contenv bash
/defaults/nextcloud-perms.sh
SUBJECT="/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*"
if [[ -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"
fi
# openssl rsa -outform der -in /ssl/privkey.pem -out /ssl/nextcloud/keys/cert.key
# openssl x509 -outform der -in /ssl/fullchain.pem -out /ssl/nextcloud/keys/cert.crt