From ba3dd35473a65d1eb3dab0123b39cd1842068c4e Mon Sep 17 00:00:00 2001 From: Dmitri Popov Date: Wed, 21 Mar 2018 19:23:48 +0100 Subject: [PATCH] Remove wpa_supplicant.conf, geocorrelation, lsblk --- README.md | 8 ++------ card-backup.sh | 21 --------------------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 5496cde..a0fec5e 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ When prompted, reboot the Raspberry Pi. ## Usage -The exact backup steps depend on the backup mode. +The exact steps depend on the backup mode. ### Card backup mode @@ -35,8 +35,6 @@ The exact backup steps depend on the backup mode. 3. Insert a storage card into a card reader and plug it into the Raspberry Pi 4. Wait till the Raspberry Pi shuts down -To geocorrelate the backed up photos, place a GPX file in the root of the storage device before plugging it into the Raspberry Pi. - **Note:** To differentiate between different storage cards, the backup script creates a datetime-based *.id* file in the root of each storage card. The name of the *.id* file is also used as the destination backup folder on the storage device. ### Camera backup mode @@ -46,9 +44,7 @@ To geocorrelate the backed up photos, place a GPX file in the root of the storag 3. Turn the camera on 4. Wait till the Raspberry Pi shuts down -Note that the direct camera file transfer script doesn't support geocorrelation. - -### Remote control mode: +### Remote control mode 1. Point the browser to *http://[IP-ADDRESS]:8080* (replace *[IP-ADDRESS]* with the actual IP address of the Raspberry Pi) 2. Start the desired backup mode by pressing the appropriate button. diff --git a/card-backup.sh b/card-backup.sh index 77a2085..3f2e849 100755 --- a/card-backup.sh +++ b/card-backup.sh @@ -25,17 +25,6 @@ CARD_DEV="sdb1" # Name of the storage card CARD_MOUNT_POINT="/media/card" # Mount point of the storage card SHUTD="5" # Minutes to wait before shutdown due to inactivity -# If there is a wpa_supplicant.conf file in the root of the storage device -# Rename the original config file, -# move wpa_supplicant.conf from the card to /etc/wpa_supplicant/ -# Reboot to enable networking -if [ -f "$STORAGE_MOUNT_POINT/wpa_supplicant.conf" ]; then - sudo sh -c "echo 100 > /sys/class/leds/led0/delay_on" - mv /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.bak - mv "$STORAGE_MOUNT_POINT/wpa_supplicant.conf" /etc/wpa_supplicant/wpa_supplicant.conf - reboot -fi - # Set the ACT LED to heartbeat sudo sh -c "echo heartbeat > /sys/class/leds/led0/trigger" @@ -85,20 +74,10 @@ if [ ! -z $CARD_READER ]; then # Set the backup path BACKUP_PATH=$STORAGE_MOUNT_POINT/"$ID" - - # Log the output of the lsblk command for troubleshooting - sudo lsblk > lsblk.log # Perform backup using rsync rsync -av --exclude "*.id" $CARD_MOUNT_POINT/ $BACKUP_PATH - # Geocorrelate photos if a .gpx file exists - cd $STORAGE_MOUNT_POINT - if [ -f *.gpx ]; then - GPX="$(ls *.gpx)" - exiftool -overwrite_original -r -ext jpg -geotag "$GPX" -geosync=120 . - fi - # Turn off the ACT LED to indicate that the backup is completed sudo sh -c "echo 0 > /sys/class/leds/led0/brightness" fi