align convert heic with mediahost and new picture sync
asd
This commit is contained in:
1 parent
efc150d9ce
commit
2eda7cd33e
2 files changed
+9
-23
No files matched your search
@@ -167,19 +167,22 @@ process_file() {
|
|||||||
|
|
||||||
|
|
||||||
HOSTNAME_EXPECTED="mediahost"
|
HOSTNAME_EXPECTED="mediahost"
|
||||||
SOURCE_DIR="/data/nextcloud/syncuser/alina/Dropfolder"
|
SOURCE_DIR="/data/nextcloud/syncuser/pictures/Alina Share/Dropfolder"
|
||||||
TARGET_DIR="/data/nextcloud/syncuser/camera"
|
TARGET_DIR="/data/nextcloud/syncuser/pictures/Camera"
|
||||||
|
|
||||||
# If running on serverhost, perform initial sync
|
# If running on serverhost, perform initial sync
|
||||||
if [[ "$(hostname)" == "$HOSTNAME_EXPECTED" ]]; then
|
if [[ "$(hostname)" == "$HOSTNAME_EXPECTED" ]]; then
|
||||||
syncNC -d -c
|
echo Sync Nextcloud
|
||||||
|
syncNC -c
|
||||||
cd "$SOURCE_DIR" || exit 1
|
cd "$SOURCE_DIR" || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ $# -gt 0 ]]; then
|
if [[ $# -gt 0 ]]; then
|
||||||
|
echo Process single file $1
|
||||||
process_file "$1"
|
process_file "$1"
|
||||||
else
|
else
|
||||||
|
echo Process dir .
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
files=( *.heic *.mov )
|
files=( *.heic *.mov )
|
||||||
|
|
||||||
@@ -202,7 +205,7 @@ if [[ "$(hostname)" == "$HOSTNAME_EXPECTED" ]]; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
|
echo Sync Nextcloud
|
||||||
syncNC -d -c
|
syncNC -c
|
||||||
fi
|
fi
|
||||||
|
|
||||||
+1
-18
@@ -25,7 +25,6 @@ SYNC_MEMES=1
|
|||||||
SYNC_AUDIOBOOKS=1
|
SYNC_AUDIOBOOKS=1
|
||||||
SYNC_RECIPIES=1
|
SYNC_RECIPIES=1
|
||||||
SYNC_ALINA=1
|
SYNC_ALINA=1
|
||||||
SYNC_ALINA_DROP=1
|
|
||||||
SYNC_WALLPAPER=1
|
SYNC_WALLPAPER=1
|
||||||
SYNC_PICTURES=1
|
SYNC_PICTURES=1
|
||||||
SYNC_SYNCFOLDER=1
|
SYNC_SYNCFOLDER=1
|
||||||
@@ -39,13 +38,12 @@ Synchronize configured directories with Nextcloud.
|
|||||||
Options:
|
Options:
|
||||||
-h, --help Show this help message and exit
|
-h, --help Show this help message and exit
|
||||||
-l Show synchronization output
|
-l Show synchronization output
|
||||||
-d Enable Alina Share synchronization
|
|
||||||
-c Enable Pictures synchronization
|
-c Enable Pictures synchronization
|
||||||
-w Enable Wallpaper synchronization
|
-w Enable Wallpaper synchronization
|
||||||
-m Enable Memes synchronization
|
-m Enable Memes synchronization
|
||||||
-s Enable Syncfolder synchronization
|
-s Enable Syncfolder synchronization
|
||||||
-ab Enable Audiobook synchronization
|
-ab Enable Audiobook synchronization
|
||||||
-al Enable Alina synchronization
|
-al Enable Alina Documents synchronization
|
||||||
-all Enable all synchronization operations
|
-all Enable all synchronization operations
|
||||||
-del Remove the Nextcloud sync marker
|
-del Remove the Nextcloud sync marker
|
||||||
--version Show script version
|
--version Show script version
|
||||||
@@ -109,11 +107,6 @@ parse_args() {
|
|||||||
-w)
|
-w)
|
||||||
SYNC_WALLPAPER=0
|
SYNC_WALLPAPER=0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-d)
|
|
||||||
SYNC_ALINA_DROP=0
|
|
||||||
;;
|
|
||||||
|
|
||||||
-s)
|
-s)
|
||||||
SYNC_SYNCFOLDER=0
|
SYNC_SYNCFOLDER=0
|
||||||
;;
|
;;
|
||||||
@@ -139,7 +132,6 @@ parse_args() {
|
|||||||
SYNC_RECIPIES=0
|
SYNC_RECIPIES=0
|
||||||
SYNC_ALINA=0
|
SYNC_ALINA=0
|
||||||
SYNC_MEMES=0
|
SYNC_MEMES=0
|
||||||
SYNC_ALINA_DROP=0
|
|
||||||
SYNC_WALLPAPER=0
|
SYNC_WALLPAPER=0
|
||||||
SYNC_PICTURES=0
|
SYNC_PICTURES=0
|
||||||
;;
|
;;
|
||||||
@@ -172,7 +164,6 @@ validate_sync_options() {
|
|||||||
SYNC_ALINA == 1 &&
|
SYNC_ALINA == 1 &&
|
||||||
SYNC_MEMES == 1 &&
|
SYNC_MEMES == 1 &&
|
||||||
SYNC_SYNCFOLDER == 1 &&
|
SYNC_SYNCFOLDER == 1 &&
|
||||||
SYNC_ALINA_DROP == 1 &&
|
|
||||||
SYNC_WALLPAPER == 1 &&
|
SYNC_WALLPAPER == 1 &&
|
||||||
SYNC_PICTURES == 1 )); then
|
SYNC_PICTURES == 1 )); then
|
||||||
|
|
||||||
@@ -202,14 +193,6 @@ sync_all() {
|
|||||||
"/data/nextcloud/syncuser/Syncfolder"
|
"/data/nextcloud/syncuser/Syncfolder"
|
||||||
(( ret += $? ))
|
(( ret += $? ))
|
||||||
fi
|
fi
|
||||||
if (( SYNC_ALINA_DROP == 0 )); then
|
|
||||||
sync_directory \
|
|
||||||
"Alina Share" \
|
|
||||||
"Alina Share/" \
|
|
||||||
"/data/nextcloud/syncuser/alina"
|
|
||||||
(( ret += $? ))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( SYNC_MEMES == 0 )); then
|
if (( SYNC_MEMES == 0 )); then
|
||||||
sync_directory \
|
sync_directory \
|
||||||
"Memes" \
|
"Memes" \
|
||||||
|
|||||||
Reference in new issue
Block a user