From 344f184a621870b51b113f65bfb8c20fa533776e Mon Sep 17 00:00:00 2001 From: nacho Date: Fri, 20 Apr 2018 16:08:44 +0200 Subject: [PATCH] ncp-report: fix root execution --- bin/ncp-diag | 3 ++- changelog.md | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/ncp-diag b/bin/ncp-diag index 9f371b086..b7d9ec951 100644 --- a/bin/ncp-diag +++ b/bin/ncp-diag @@ -37,7 +37,8 @@ SWP="$( swapon | tail -1 | awk '{ print $1 }' )" echo "swapfile|$SWP" # Nextcloud -VERSION="$( php /var/www/nextcloud/occ status | grep "version:" | awk '{ print $3 }' )" +[[ ${EUID} -eq 0 ]] && SUDO="sudo -u www-data" +VERSION="$( $SUDO php /var/www/nextcloud/occ status | grep "version:" | awk '{ print $3 }' )" if [[ "$VERSION" != "" ]]; then echo "Nextcloud check|ok" echo "Nextcloud version|$VERSION" diff --git a/changelog.md b/changelog.md index 0ef043b27..661cd8fc4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ -[v0.53.29](https://github.com/nextcloud/nextcloudpi/commit/dc1289f) (2018-04-05) renamed to NextCloudPlus +[v0.53.30](https://github.com/nextcloud/nextcloudpi/commit/63f22a2) (2018-04-20) ncp-report: fix root execution + +[v0.53.29](https://github.com/nextcloud/nextcloudpi/commit/79529c7) (2018-04-05) renamed to NextCloudPlus [v0.53.28](https://github.com/nextcloud/nextcloudpi/commit/ab913c2) (2018-04-18) ncp-web: added spanish translations