This commit is contained in:
Dobromir Popov
2023-09-02 16:27:12 +03:00
4 changed files with 158 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/bin/bash
source_dir="/mnt/storage/nextcloud/popov/files/PORTABLE/"
destination_dir="/mnt/nas4T/DOBY/Portable/"
# Check if the source directory exists
if [ ! -d "$source_dir" ]; then
echo "Source directory not found: $source_dir"
exit 1
fi
# Check if the destination directory exists
if [ ! -d "$destination_dir" ]; then
echo "Destination directory not found: $destination_dir"
exit 1
fi
# Loop through the subdirectories in the source directory
for subdir in "$source_dir"/*; do
if [ -d "$subdir" ]; then
subfolder=$(basename "$subdir")
echo "Syncing $subfolder..."
rsync -ah --info=progress2 --relative --rsync-path="mkdir -p '$destination_dir' && rsync" "$source_dir$subfolder/" "$destination_dir"
fi
done
echo "All subfolders synced."

7
linux/tasks/start_vnc.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
vncserver :1 -geometry 1920x1080
#and novnc:
/usr/share/novnc/utils/launch.sh --vnc localhost:5901