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