library.sh: Remove invalid trusted_proxy

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias Knöppler 2024-04-29 00:40:01 +02:00 committed by Tobias K
parent 68e2e2d7ac
commit 242ca671f9
No known key found for this signature in database
GPG Key ID: 44FD368932E645C1
3 changed files with 7 additions and 2 deletions

View File

@ -327,7 +327,6 @@ jobs:
runs-on: [ubuntu-20.04]
env:
VERSION: "${{ inputs.git_ref || github.ref }}"
ARTIFACT_NAME: "${{ needs.build-previous.outputs.artifact_name }}"
LXC: "${{ needs.determine-runner.outputs.lxc_cmd }}"
PREVIOUS_IMAGE_URL: "https://github.com/nextcloud/nextcloudpi/releases/download/v1.53.2/NextcloudPi_LXD_x86_v1.53.2.tar.gz"
steps:

View File

@ -156,7 +156,7 @@ function set-nc-domain()
if is_ncp_activated && is_app_enabled notify_push; then
ncc config:system:set trusted_proxies 11 --value="127.0.0.1"
ncc config:system:set trusted_proxies 12 --value="::1"
ncc config:system:set trusted_proxies 13 --value="${domain}"
# ncc config:system:set trusted_proxies 13 --value="${domain}"
ncc config:system:set trusted_proxies 14 --value="$(dig +short "${domain}")"
sleep 5 # this seems to be required in the VM for some reason. We get `http2 error: protocol error` after ncp-upgrade-nc
for try in {1..5}

View File

@ -7,5 +7,11 @@ then
sed -i -e 's/^PermitRootLogin.*$/PermitRootLogin No/' /etc/ssh/sshd_config
fi
for i in {10..15}
do
proxy="$(ncc config:system:get trusted_proxies "$i")"
[[ -z "$proxy" ]] || python3 -c "import ipaddress; ipaddress.ip_address('${proxy}')" || ncc config:system:delete trusted_proxies "$i"
done
apt-get update
apt-get install --no-install-recommends -y tmux