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
path: root/bin
diff options
context:
space:
mode:
authorDesktopECHO <33142753+DesktopECHO@users.noreply.github.com>2022-08-25 14:13:02 +0300
committerGitHub <noreply@github.com>2022-08-25 14:13:02 +0300
commitc41d38aa2afb717bb93cd97a0b54a647c3eaeae1 (patch)
tree415629ab6bb6ffdf27d1095b690dff61e627d837 /bin
parentc072a9c4d76fbcfdfca54e92cf0ccc1df7c3850b (diff)
Use dpkg for architecture detection (#1481)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ncp-update-nc4
-rw-r--r--bin/ncp/CONFIG/nc-init.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc
index 84698431..7754175c 100755
--- a/bin/ncp-update-nc
+++ b/bin/ncp-update-nc
@@ -194,8 +194,8 @@ else
apachectl -k graceful
## make sure the notify_push daemon is runnnig
- arch="$(uname -m)"
- [[ "${arch}" =~ "armv7" ]] && arch="armv7"
+ arch="$(dpkg --print-architecture)"
+ [[ "${arch}" =~ ^(armhf|arm)$ ]] && arch="armv7"
cat > /etc/systemd/system/notify_push.service <<EOF
[Unit]
Description = Push daemon for Nextcloud clients
diff --git a/bin/ncp/CONFIG/nc-init.sh b/bin/ncp/CONFIG/nc-init.sh
index e5d0cc05..b63af1dd 100644
--- a/bin/ncp/CONFIG/nc-init.sh
+++ b/bin/ncp/CONFIG/nc-init.sh
@@ -152,7 +152,7 @@ EOF
ncc app:disable updatenotification
# News dropped support for 32-bit -> https://github.com/nextcloud/news/issues/1423
- if ! [[ "$(uname -m)" =~ "armv7" ]]; then
+ if ! [[ "$(dpkg --print-architecture)" =~ ^(armhf|arm)$ ]]; then
ncc app:install news
ncc app:enable news
fi