File tree Expand file tree Collapse file tree 6 files changed +28
-3
lines changed
Expand file tree Collapse file tree 6 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ REDISPASS="$( grep "^requirepass" /etc/redis/redis.conf | cut -f2 -d' ' )"
1313 REDISPASS=" $( openssl rand -base64 32 ) "
1414 echo Provisioning Redis password
1515 sed -i -E " s|^requirepass .*|requirepass $REDISPASS |" /etc/redis/redis.conf
16+ chown redis:redis /etc/redis/redis.conf
1617 [[ " $DOCKERBUILD " != 1 ]] && systemctl restart redis
1718}
1819
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ configure()
5959 local CURRENT_REDIS_MEM=$( grep " ^maxmemory" " $CONF " | awk ' { print $2 }' )
6060 [[ " $REDISMEM " != " $CURRENT_REDIS_MEM " ]] && {
6161 sed -i " s|^maxmemory .*|maxmemory $REDISMEM |" " $CONF "
62+ chown redis:redis " $CONF "
6263 service redis-server restart
6364 }
6465}
Original file line number Diff line number Diff line change @@ -54,7 +54,15 @@ configure()
5454 sed -i " /DocumentRoot/aServerName $DOMAIN " $vhostcfg
5555
5656 # Do it
57- $letsencrypt certonly -n --force-renew --no-self-upgrade --webroot -w $ncdir --hsts --agree-tos -m $EMAIL -d $DOMAIN && {
57+ local domain_string=" "
58+ for domain in $DOMAIN $ADDITIONAL_DOMAIN ; do
59+ [[ " $domain " != " " ]] && {
60+ [[ $domain_string == " " ]] && \
61+ domain_string+=" ${domain} " || \
62+ domain_string+=" ,${domain} "
63+ }
64+ done
65+ $letsencrypt certonly -n --force-renew --no-self-upgrade --webroot -w $ncdir --hsts --agree-tos -m $EMAIL -d $domain_string && {
5866
5967 # Set up auto-renewal
6068 cat > /etc/cron.weekly/letsencrypt-ncp << EOF
9199 sed -i " s|SSLCertificateKeyFile.*|SSLCertificateKeyFile /etc/letsencrypt/live/$DOMAIN_LOWERCASE /privkey.pem|" $vhostcfg2
92100
93101 # Configure Nextcloud
94- ncc config:system:set trusted_domains 4 --value=$DOMAIN
102+ local domain_index=12
103+ for dom in $DOMAIN $ADDITIONAL_DOMAIN ; do
104+ [[ " $dom " != " " ]] && {
105+ ncc config:system:set trusted_domains $domain_index --value=$dom
106+ (( domain_index++ ))
107+ }
108+ done
95109 ncc config:system:set overwrite.cli.url --value=https://" $DOMAIN " /
96110
97111 # delayed in bg so it does not kill the connection, and we get AJAX response
Original file line number Diff line number Diff line change 11
2- [ v1.18.0] ( https://github.com/nextcloud/nextcloudpi/commit/c140109 ) (2019-10-27) add ncp-previews
2+ [ v1.18.1] ( https://github.com/nextcloud/nextcloudpi/commit/ebe9592 ) (2019-11-18) Letsencrypt: support second domain (#1025 )
3+
4+ [ v1.18.0, master] ( https://github.com/nextcloud/nextcloudpi/commit/0fc2390 ) (2019-10-27) add ncp-previews
35
46[ v1.17.1 ] ( https://github.com/nextcloud/nextcloudpi/commit/c63cb27 ) (2019-09-29) nc-backup: exclude group folders in dataless backup
57
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ ln -s /data/nextcloud /var/www/nextcloud
2222
2323echo " Starting Redis"
2424sed -i ' s|^requirepass .*|requirepass default|' /etc/redis/redis.conf
25+ chown redis:redis /etc/redis/redis.conf
2526mkdir -p /var/run/redis
2627chown redis /var/run/redis
2728sudo -u redis redis-server /etc/redis/redis.conf
Original file line number Diff line number Diff line change 1212 " value" : " mycloud.ownyourbits.com" ,
1313 " suggest" : " mycloud.ownyourbits.com"
1414 },
15+ {
16+ " id" : " ADDITIONAL_DOMAIN" ,
17+ " name" : " Additional domain" ,
18+ " value" : " " ,
19+ " suggest" : " optional.cloud.ownyourbits.com"
20+ },
1521 {
1622 " id" : " EMAIL" ,
1723 " name" : " Email" ,
You can’t perform that action at this time.
0 commit comments