diff --git a/backup.sh b/backup.sh index 86d8f03..ca595b9 100755 --- a/backup.sh +++ b/backup.sh @@ -5,7 +5,12 @@ # to install the required packages and configure the system. # Specify devices and their mount points -source config.cfg +# and other settings +STORAGE_DEV="sda1" +STORAGE_MOUNT_POINT="/media/storage" +CARD_DEV="sdb1" +CARD_MOUNT_POINT="/media/card" +GEO_REF="GEO.JPG" # If there is a wpa_supplicant.conf file in the root of the storage device # Rename the original config file, @@ -73,6 +78,12 @@ sudo lsblk > lsblk.log # Perform backup using rsync rsync -av --exclude "*.id" $CARD_MOUNT_POINT/ $BACKUP_PATH +# Geotag photos if the reference photo exists +if [ -f "$STORAGE_MOUNT_POINT/$GEO_REF" ]; then + cd $STORAGE_MOUNT_POINT + exiftool −overwrite_original_in_place -r -tagsFromFile $GEO_REF -gps:all -ext=JPG . +fi + # Turn off the ACT LED to indicate that the backup is completed sudo sh -c "echo 0 > /sys/class/leds/led0/brightness" fi