File tree Expand file tree Collapse file tree 2 files changed +48
-6
lines changed
Expand file tree Collapse file tree 2 files changed +48
-6
lines changed Original file line number Diff line number Diff line change 1111
1212install ()
1313{
14- cat > /usr/local/bin/ncp-scan << EOF
14+ cat > /usr/local/bin/ncp-scan << ' EOF '
1515#!/bin/bash
16- cd /var/www/nextcloud
17- sudo -u www-data php occ files:scan --all
16+ ncc files:scan -n -v --all
1817EOF
1918 chmod +x /usr/local/bin/ncp-scan
2019}
2120
2221configure ()
2322{
24- /usr/local/bin/ncp-scan
23+ [[ " $RECURSIVE " == no ]] && local recursive=--shallow
24+ [[ " $NONEXTERNAL " == yes ]] && local non_external=--home-only
25+
26+ [[ " $PATH1 " != " " ]] && \
27+ ncc files:scan -n -v $recursive $non_external -p " $PATH1 "
28+
29+ [[ " $PATH2 " != " " ]] && \
30+ ncc files:scan -n -v $recursive $non_external -p " $PATH2 "
31+
32+ [[ " $PATH3 " != " " ]] && \
33+ ncc files:scan -n -v $recursive $non_external -p " $PATH3 "
34+
35+ [[ " ${PATH1}${PATH2}${PATH3} " == " " ]] && ncc files:scan -n -v --all
2536}
2637
2738# License
Original file line number Diff line number Diff line change 33 " name" : " Nc-scan" ,
44 " title" : " nc-scan" ,
55 " description" : " Scan NC for externally modified files" ,
6- " info" : " " ,
6+ " info" : " Optionally we can specify up to 3 paths in the form '_user_/files/_path_' " ,
77 " infotitle" : " " ,
8- " params" : []
8+ " params" : [
9+ {
10+ " id" : " RECURSIVE" ,
11+ " name" : " Recursive" ,
12+ " value" : " yes" ,
13+ " type" : " bool"
14+ },
15+ {
16+ " id" : " NONEXTERNAL" ,
17+ " name" : " Ignore external files" ,
18+ " value" : " no" ,
19+ " type" : " bool"
20+ },
21+ {
22+ " id" : " PATH1" ,
23+ " name" : " Path" ,
24+ " value" : " " ,
25+ " suggest" : " /ncp/files/Documents"
26+ },
27+ {
28+ " id" : " PATH2" ,
29+ " name" : " Path" ,
30+ " value" : " " ,
31+ " suggest" : " /family/files/Photos"
32+ },
33+ {
34+ " id" : " PATH3" ,
35+ " name" : " Path" ,
36+ " value" : " " ,
37+ " suggest" : " /family/files/Videos"
38+ }
39+ ]
940}
You can’t perform that action at this time.
0 commit comments