From 04feb7c260ec1202be9704cc55a0873fb3fa21a2 Mon Sep 17 00:00:00 2001 From: Dmitri Popov Date: Mon, 29 Jan 2018 15:45:55 +0100 Subject: [PATCH] Remove mount share. Add config --- backup.sh | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/backup.sh b/backup.sh index 4b75df5..86d8f03 100755 --- a/backup.sh +++ b/backup.sh @@ -5,10 +5,7 @@ # to install the required packages and configure the system. # Specify devices and their mount points -STORAGE_DEV="sda1" -STORAGE_MOUNT_POINT="/media/storage" -CARD_DEV="sdb1" -CARD_MOUNT_POINT="/media/card" +source config.cfg # If there is a wpa_supplicant.conf file in the root of the storage device # Rename the original config file, @@ -21,17 +18,6 @@ if [ -f "$STORAGE_MOUNT_POINT/wpa_supplicant.conf" ]; then reboot fi -# If there is a nfs_mount file in the root of the storage device -# Read the mount command and mount an NFS export -if [ -f "$STORAGE_MOUNT_POINT/share_mount" ]; then - sudo sh -c "echo 100 > /sys/class/leds/led0/delay_on" - MOUNT_COMMAND=$(head -n 1 "$STORAGE_MOUNT_POINT/share_mount") - sudo $MOUNT_COMMAND - SHARE_MOUNT_POINT=`echo "$MOUNT_COMMAND" cut -d" " -f5` -else - SHARE_MOUNT_POINT="" -fi - # Set the ACT LED to heartbeat sudo sh -c "echo heartbeat > /sys/class/leds/led0/trigger" @@ -87,12 +73,6 @@ sudo lsblk > lsblk.log # Perform backup using rsync rsync -av --exclude "*.id" $CARD_MOUNT_POINT/ $BACKUP_PATH -# If an NFS export is mounted -# Back up files to it -if [ ! -z "$SHARE_MOUNT_POINT" ]; then - rsync -av --exclude "*.id" $BACKUP_PATH/ $SHARE_MOUNT_POINT -fi - # Turn off the ACT LED to indicate that the backup is completed sudo sh -c "echo 0 > /sys/class/leds/led0/brightness" fi