diff options
Diffstat (limited to 'bin/ncp/TOOLS/nc-scan.sh')
-rw-r--r-- | bin/ncp/TOOLS/nc-scan.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/ncp/TOOLS/nc-scan.sh b/bin/ncp/TOOLS/nc-scan.sh index b8b40507..394bb53c 100644 --- a/bin/ncp/TOOLS/nc-scan.sh +++ b/bin/ncp/TOOLS/nc-scan.sh @@ -11,17 +11,28 @@ install() { - cat > /usr/local/bin/ncp-scan <<EOF + cat > /usr/local/bin/ncp-scan <<'EOF' #!/bin/bash -cd /var/www/nextcloud -sudo -u www-data php occ files:scan --all +ncc files:scan -n -v --all EOF chmod +x /usr/local/bin/ncp-scan } configure() { - /usr/local/bin/ncp-scan + [[ "$RECURSIVE" == no ]] && local recursive=--shallow + [[ "$NONEXTERNAL" == yes ]] && local non_external=--home-only + + [[ "$PATH1" != "" ]] && \ + ncc files:scan -n -v $recursive $non_external -p "$PATH1" + + [[ "$PATH2" != "" ]] && \ + ncc files:scan -n -v $recursive $non_external -p "$PATH2" + + [[ "$PATH3" != "" ]] && \ + ncc files:scan -n -v $recursive $non_external -p "$PATH3" + + [[ "${PATH1}${PATH2}${PATH3}" == "" ]] && ncc files:scan -n -v --all } # License |