Add geotagging

This commit is contained in:
Dmitri Popov
2018-01-30 14:58:12 +01:00
committed by GitHub
parent 59390b24ee
commit 36386b00d8

View File

@@ -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