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:
authornachoparker <nacho@ownyourbits.com>2018-12-10 04:08:33 +0300
committernachoparker <nacho@ownyourbits.com>2019-01-05 04:14:52 +0300
commitd5c1f0058b43c22ebb132f51df0ea144fbd927ec (patch)
treeb826d4fefb22afc2513a57e9464a486b9fd24dcc /bin/ncp-diag
parent21fee19452410817d26b6caebd0a91b5968b0a44 (diff)
rework to use JSON based cfg and more
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 4e646c0f..7e9e2a63 100644
--- a/bin/ncp-diag
+++ b/bin/ncp-diag
@@ -23,7 +23,8 @@ test -d "$DATADIR" || DIRINFO=" (doesn't exist)"
USBDEVS="$( lsblk -S -o NAME,TRAN | awk '{ if ( $2 == "usb" ) print $1; }' | tr '\n' ' ' )"
[[ "$USBDEVS" == "" ]] && USBDEVS="none"
-[[ -f /usr/local/etc/ncp-config.d/nc-automount.sh ]] && echo "automount|$( grep "^ACTIVE_" /usr/local/etc/ncp-config.d/nc-automount.sh | cut -d'=' -f2 )"
+am_cfg="/usr/local/etc/nc-automount.cfg"
+[[ -f "$am_cfg" ]] && [[ "$(jq -r ".params[0].value" "$am_cfg")" == "yes" ]] && echo "automount|yes" || echo "automount|no"
echo "USB devices|$USBDEVS"
echo "datadir|$DATADIR$DIRINFO"
[[ "$DIRINFO" == "" ]] && {