diff --git a/backup.sh b/backup.sh index 0a7a038..1559bdb 100755 --- a/backup.sh +++ b/backup.sh @@ -56,6 +56,9 @@ if [ ! -z $CARD_READER ]; then if [ ! -f $CARD_MOUNT_POINT/*.id ]; then ID=$RANDOM touch $ID."id" + else + ID_FILE=$(ls *.id) + ID="${ID_FILE%.*}" fi # Set the backup path