mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
Use dpkg for architecture detection (#1481)
This commit is contained in:
parent
c072a9c4d7
commit
c41d38aa2a
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -164,8 +164,8 @@ function start_notify_push
|
||||
pgrep notify_push &>/dev/null && return
|
||||
if [[ -f /.docker-image ]]; then
|
||||
local arch
|
||||
arch="$(uname -m)"
|
||||
[[ "${arch}" =~ "armv7" ]] && arch="armv7"
|
||||
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 &
|
||||
else
|
||||
systemctl enable --now notify_push
|
||||
|
||||
@ -35,8 +35,8 @@ install_app nc-restore
|
||||
[[ ! -f /.docker-image ]] && {
|
||||
|
||||
# fix HPB with dynamic public IP
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user