mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-15 17:08:19 +01:00
24 lines
892 B
Plaintext
24 lines
892 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/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
|
|
|
|
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"
|
|
fi
|
|
|
|
|