add Syncfolder to syncNC
This commit is contained in:
1 parent
d992905301
commit
fd77d08ef0
1 file changed
+15
@@ -28,6 +28,7 @@ SYNC_ALINA=1
|
||||
SYNC_ALINA_DROP=1
|
||||
SYNC_WALLPAPER=1
|
||||
SYNC_CAMERA=1
|
||||
SYNC_SYNCFOLDER=1
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
@@ -42,6 +43,7 @@ Options:
|
||||
-c Enable Camera synchronization
|
||||
-w Enable Wallpaper synchronization
|
||||
-m Enable Memes synchronization
|
||||
-s Enable Syncfolder synchronization
|
||||
-ab Enable Audiobook synchronization
|
||||
-al Enable Alina synchronization
|
||||
-all Enable all synchronization operations
|
||||
@@ -81,6 +83,7 @@ sync_directory() {
|
||||
run_cmd nextcloudcmd \
|
||||
--trust \
|
||||
-n \
|
||||
--logdebug \
|
||||
--path "$remote_path" \
|
||||
"$local_path" \
|
||||
"$SERVER"
|
||||
@@ -111,6 +114,10 @@ parse_args() {
|
||||
SYNC_ALINA_DROP=0
|
||||
;;
|
||||
|
||||
-s)
|
||||
SYNC_SYNCFOLDER=0
|
||||
;;
|
||||
|
||||
-c)
|
||||
SYNC_CAMERA=0
|
||||
;;
|
||||
@@ -164,6 +171,7 @@ validate_sync_options() {
|
||||
SYNC_RECIPIES == 1 &&
|
||||
SYNC_ALINA == 1 &&
|
||||
SYNC_MEMES == 1 &&
|
||||
SYNC_SYNCFOLDER == 1 &&
|
||||
SYNC_ALINA_DROP == 1 &&
|
||||
SYNC_WALLPAPER == 1 &&
|
||||
SYNC_CAMERA == 1 )); then
|
||||
@@ -187,6 +195,13 @@ sync_all() {
|
||||
(( ret += $? ))
|
||||
fi
|
||||
|
||||
if (( SYNC_SYNCFOLDER == 0 )); then
|
||||
sync_directory \
|
||||
"Syncfolder" \
|
||||
"Syncfolder/" \
|
||||
"/data/nextcloud/syncuser/Syncfolder"
|
||||
(( ret += $? ))
|
||||
fi
|
||||
if (( SYNC_ALINA_DROP == 0 )); then
|
||||
sync_directory \
|
||||
"Alina Share" \
|
||||
|
||||
Reference in new issue
Block a user