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
diff options
context:
space:
mode:
authorthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-22 13:28:16 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-22 13:28:16 +0300
commitcdce1c24de3775611b76f4261b2c1ae78776fd09 (patch)
treeb2a6c49435b7b3e3b771585a614dfa8d3dee6f44 /bin/ncp-diag
parent546fd0d46d6295478e346cbda985cfb454e44469 (diff)
ncp-diag: Fix datadir incorrectly report if running as user www-data
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
Diffstat (limited to 'bin/ncp-diag')
-rw-r--r--bin/ncp-diag3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ncp-diag b/bin/ncp-diag
index 679b9f60..5c26c20d 100644
--- a/bin/ncp-diag
+++ b/bin/ncp-diag
@@ -19,7 +19,8 @@ echo "NextCloudPi version|$( cat /usr/local/etc/ncp-version )"
echo "OS|$(cat /etc/issue | sed 's| \\n \\l||'). $(uname -r) ($(uname -m))"
# Data
-DATADIR="$( get_nc_config_value datadirectory )"
+DATADIR="$( grep datadirectory /var/www/nextcloud/config/config.php |
+ awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )"
test -d "$DATADIR" || DIRINFO=" (doesn't exist)"
USBDEVS="$( lsblk -S -o NAME,TRAN | awk '{ if ( $2 == "usb" ) print $1; }' | tr '\n' ' ' )"
[[ "$USBDEVS" == "" ]] && USBDEVS="none"