diff options
-rw-r--r-- | bin/ncp-diag | 5 | ||||
-rw-r--r-- | changelog.md | 6 | ||||
-rw-r--r-- | ncp.sh | 3 | ||||
-rw-r--r-- | updates/1.45.0.sh | 8 |
4 files changed, 15 insertions, 7 deletions
diff --git a/bin/ncp-diag b/bin/ncp-diag index 7f2a49bf..c9cd89cb 100644 --- a/bin/ncp-diag +++ b/bin/ncp-diag @@ -45,8 +45,7 @@ test -d "$DBDIR" || DBDIRINFO=" (doesn't exist)" echo "dbdir|$DBDIR$DBDIRINFO" # Nextcloud -[[ ${EUID} -eq 0 ]] && SUDO="sudo -u www-data" -VERSION="$( $SUDO php /var/www/nextcloud/occ status | grep "version:" | awk '{ print $3 }' )" +VERSION="$( ncc status | grep "version:" | awk '{ print $3 }' )" if [[ "$VERSION" != "" ]]; then echo "Nextcloud check|ok" echo "Nextcloud version|$VERSION" @@ -59,7 +58,7 @@ echo "HTTPD service|$( pgrep -c apache2 &>/dev/null && echo up || echo down )" echo "PHP service|$( pgrep -c php-fpm &>/dev/null && echo up || echo down )" echo "MariaDB service|$( pgrep -c mysqld &>/dev/null && echo up || echo down )" echo "Redis service|$( pgrep -c redis-server &>/dev/null && echo up || echo down )" -echo "HPB service|$($SUDO php /var/www/nextcloud/occ notify_push:self-test &>/dev/null && echo up || echo down )" +echo "HPB service|$( ncc notify_push:self-test &>/dev/null && echo up || echo down )" echo "Postfix service|$( pgrep -fc postfix &>/dev/null && echo up || echo down )" # WAN diff --git a/changelog.md b/changelog.md index 1661493d..1dce244d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,9 @@ -[v1.44.2](https://github.com/nextcloud/nextcloudpi/commit/3d274e1) (2021-11-16) ncp-app: bump to NC22 +[v1.44.3](https://github.com/nextcloud/nextcloudpi/commit/70eae61) (2021-11-18) tweak ncc command -[v1.44.1](https://github.com/nextcloud/nextcloudpi/commit/4032628) (2021-11-16) ncp-previewgenerator: update to NC22 +[v1.44.2](https://github.com/nextcloud/nextcloudpi/commit/0c589ff) (2021-11-16) ncp-app: bump to NC22 -[v1.44.0 ](https://github.com/nextcloud/nextcloudpi/commit/3113a0e) (2021-11-16) upgrade to NC22.2.1 +[v1.44.1 ](https://github.com/nextcloud/nextcloudpi/commit/2aa95c6) (2021-11-16) ncp-previewgenerator: update to NC22 [v1.43.7](https://github.com/nextcloud/nextcloudpi/commit/6aba9b9) (2021-11-05) nc-restore: improve restoring data from SD to docker @@ -34,7 +34,8 @@ install() # add the ncc shortcut cat > /usr/local/bin/ncc <<'EOF' #!/bin/bash -sudo -E -u www-data php /var/www/nextcloud/occ "$@" +[[ ${EUID} -eq 0 ]] && SUDO="sudo -E -u www-data" +${SUDO} php /var/www/nextcloud/occ "$@" EOF chmod +x /usr/local/bin/ncc diff --git a/updates/1.45.0.sh b/updates/1.45.0.sh index 16778309..6829df17 100644 --- a/updates/1.45.0.sh +++ b/updates/1.45.0.sh @@ -11,6 +11,14 @@ source /usr/local/etc/library.sh # sets NCLATESTVER PHPVER RELEASE # this update brings a version bump for ncp-previewgenerator ncc upgrade +# update ncc +cat > /usr/local/bin/ncc <<'EOF' +#!/bin/bash +[[ ${EUID} -eq 0 ]] && SUDO="sudo -E -u www-data" +${SUDO} php /var/www/nextcloud/occ "$@" +EOF +chmod +x /usr/local/bin/ncc + # docker images only [[ -f /.docker-image ]] && { : |