diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc index 7754175c6..1ea8ef9dc 100755 --- a/bin/ncp-update-nc +++ b/bin/ncp-update-nc @@ -194,8 +194,6 @@ else apachectl -k graceful ## make sure the notify_push daemon is runnnig - arch="$(dpkg --print-architecture)" - [[ "${arch}" =~ ^(armhf|arm)$ ]] && arch="armv7" cat > /etc/systemd/system/notify_push.service < https://github.com/nextcloud/news/issues/1423 - if ! [[ "$(dpkg --print-architecture)" =~ ^(armhf|arm)$ ]]; then + if ! [[ "$ARCH" =~ armv7 ]]; then ncc app:install news ncc app:enable news fi diff --git a/etc/library.sh b/etc/library.sh index 1b0feb629..b9cca1675 100644 --- a/etc/library.sh +++ b/etc/library.sh @@ -13,6 +13,10 @@ export BINDIR=/usr/local/bin/ncp export NCDIR=/var/www/nextcloud export ncc=/usr/local/bin/ncc export NCPCFG=${NCPCFG:-etc/ncp.cfg} +export ARCH="$(dpkg --print-architecture)" +[[ "${ARCH}" =~ ^(armhf|arm)$ ]] && ARCH="armv7" +[[ "${ARCH}" == "arm64" ]] && ARCH=aarch64 +[[ "${ARCH}" == "amd64" ]] && ARCH=x86_64 # Prevent systemd pager from blocking script execution export SYSTEMD_PAGER= @@ -163,10 +167,7 @@ function start_notify_push { pgrep notify_push &>/dev/null && return if [[ -f /.docker-image ]]; then - local arch - arch="$(dpkg --print-architecture)" - [[ "${arch}" =~ ^(armhf|arm)$ ]] && arch="armv7" - 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 & + 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.43.0.sh b/updates/1.43.0.sh index 63fb33eb2..32706ce27 100644 --- a/updates/1.43.0.sh +++ b/updates/1.43.0.sh @@ -35,8 +35,6 @@ install_app nc-restore [[ ! -f /.docker-image ]] && { # fix HPB with dynamic public IP - arch="$(dpkg --print-architecture)" - [[ "${arch}" =~ ^(armhf|arm)$ ]] && arch="armv7" cat > /etc/systemd/system/notify_push.service <