Skip to content

Commit

Permalink
also save hostname in trusted domains
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <[email protected]>
  • Loading branch information
nachoparker committed Oct 15, 2021
1 parent c75db63 commit cf4cfd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/nextcloud-domain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ while :; do
sleep 3
done

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

# we might need to retry if redis is not ready
while :; do
Expand Down
3 changes: 2 additions & 1 deletion etc/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export NCDIR=/var/www/nextcloud
export TRUSTED_DOMAINS=(
[ip]=1 [dnsmasq]=2 [nc_domain]=3 [nextcloudpi-local]=5 [docker_overwrite]=6
[nextcloudpi]=7 [nextcloudpi-lan]=8 [public_ip]=11 [letsencrypt_1]=12
[letsencrypt_2]=13 [trusted_domain_1]=20 [trusted_domain_1]=21 [trusted_domain_1]=22)
[letsencrypt_2]=13 [hostname]=14 [trusted_domain_1]=20 [trusted_domain_2]=21 [trusted_domain_3]=22
)

command -v jq &>/dev/null || {
apt-get update
Expand Down
2 changes: 1 addition & 1 deletion ncp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ EOF

# LIMIT LOG SIZE
grep -q maxsize /etc/logrotate.d/apache2 || sed -i /weekly/amaxsize2M /etc/logrotate.d/apache2
cat >> /etc/logrotate.d/ncp <<'EOF'
cat > /etc/logrotate.d/ncp <<'EOF'
/var/log/ncp.log
{
rotate 4
Expand Down

0 comments on commit cf4cfd8

Please sign in to comment.