Skip to content

Commit cf4cfd8

Browse files
committed
also save hostname in trusted domains
Signed-off-by: nachoparker <nacho@ownyourbits.com>
1 parent c75db63 commit cf4cfd8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

bin/nextcloud-domain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ while :; do
1313
sleep 3
1414
done
1515

16-
# set "${TRUSTED_DOMAINS[ip]}"
17-
ncc config:system:set trusted_domains 1 --value=${ip}
16+
ncc config:system:set trusted_domains "${TRUSTED_DOMAINS[ip]}" --value="${ip}"
17+
ncc config:system:set trusted_domains "${TRUSTED_DOMAINS[hostname]}" --value="$(hostname -f)"
1818

1919
# we might need to retry if redis is not ready
2020
while :; do

etc/library.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export NCDIR=/var/www/nextcloud
1616
export TRUSTED_DOMAINS=(
1717
[ip]=1 [dnsmasq]=2 [nc_domain]=3 [nextcloudpi-local]=5 [docker_overwrite]=6
1818
[nextcloudpi]=7 [nextcloudpi-lan]=8 [public_ip]=11 [letsencrypt_1]=12
19-
[letsencrypt_2]=13 [trusted_domain_1]=20 [trusted_domain_1]=21 [trusted_domain_1]=22)
19+
[letsencrypt_2]=13 [hostname]=14 [trusted_domain_1]=20 [trusted_domain_2]=21 [trusted_domain_3]=22
20+
)
2021

2122
command -v jq &>/dev/null || {
2223
apt-get update

ncp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ EOF
205205

206206
# LIMIT LOG SIZE
207207
grep -q maxsize /etc/logrotate.d/apache2 || sed -i /weekly/amaxsize2M /etc/logrotate.d/apache2
208-
cat >> /etc/logrotate.d/ncp <<'EOF'
208+
cat > /etc/logrotate.d/ncp <<'EOF'
209209
/var/log/ncp.log
210210
{
211211
rotate 4

0 commit comments

Comments
 (0)