From 9bddfad8057c713c2698e768c855348498438dda Mon Sep 17 00:00:00 2001 From: nachoparker Date: Tue, 12 Oct 2021 17:01:05 -0600 Subject: fix HPB with dynamic IP Signed-off-by: nachoparker --- bin/ncp/CONFIG/nc-nextcloud.sh | 1 + etc/library.sh | 2 +- updates/1.41.0.sh | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/bin/ncp/CONFIG/nc-nextcloud.sh b/bin/ncp/CONFIG/nc-nextcloud.sh index 7b60219a..795ffafa 100644 --- a/bin/ncp/CONFIG/nc-nextcloud.sh +++ b/bin/ncp/CONFIG/nc-nextcloud.sh @@ -219,6 +219,7 @@ After = mysql.service [Service] Environment = PORT=7867 +Environment = NEXTCLOUD_URL=https://localhost ExecStart = /var/www/nextcloud/apps/notify_push/bin/"${arch}"/notify_push --allow-self-signed /var/www/nextcloud/config/config.php User=www-data diff --git a/etc/library.sh b/etc/library.sh index 12aff17b..97be4b09 100644 --- a/etc/library.sh +++ b/etc/library.sh @@ -143,7 +143,7 @@ function start_notify_push local arch arch="$(uname -m)" [[ "${arch}" =~ "armv7" ]] && arch="armv7" - sudo -u www-data /var/www/nextcloud/apps/notify_push/bin/"${arch}"/notify_push --allow-self-signed /var/www/nextcloud/config/config.php &>/dev/null & + NEXTCLOUD_URL=https://localhost sudo -E -u www-data /var/www/nextcloud/apps/notify_push/bin/"${arch}"/notify_push --allow-self-signed /var/www/nextcloud/config/config.php &>/dev/null & else systemctl enable --now notify_push fi diff --git a/updates/1.41.0.sh b/updates/1.41.0.sh index 4a8f5375..8fd474de 100644 --- a/updates/1.41.0.sh +++ b/updates/1.41.0.sh @@ -20,6 +20,26 @@ run_app nc-notify-updates # for non docker images [[ ! -f /.docker-image ]] && { + # fix HPB with dynamic public IP + arch="$(uname -m)" + [[ "${arch}" =~ "armv7" ]] && arch="armv7" + cat > /etc/systemd/system/notify_push.service < /usr/lib/systemd/system/nextcloud-domain.service <<'EOF' [Unit] -- cgit v1.2.3