Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2021-10-15 18:01:20 +0300
committernachoparker <nacho@ownyourbits.com>2021-10-15 18:01:20 +0300
commitcf4cfd81a86a8752d7a57063a2e2d1cac6701379 (patch)
treed77465cb894804d729eeeeb7df20f3960b8d6641
parentc75db632609460aeac90ee05244cda48aa5f400a (diff)
also save hostname in trusted domainsv1.41.2
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r--bin/nextcloud-domain.sh4
-rw-r--r--etc/library.sh3
-rw-r--r--ncp.sh2
3 files changed, 5 insertions, 4 deletions
diff --git a/bin/nextcloud-domain.sh b/bin/nextcloud-domain.sh
index f15c7a39..3267ed0c 100644
--- a/bin/nextcloud-domain.sh
+++ b/bin/nextcloud-domain.sh
@@ -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
diff --git a/etc/library.sh b/etc/library.sh
index 97be4b09..a9215467 100644
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -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
diff --git a/ncp.sh b/ncp.sh
index 2f3ac751..0b3dd5a4 100644
--- a/ncp.sh
+++ b/ncp.sh
@@ -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