Add else to handle existing .id file 🐒

This commit is contained in:
Dmitri Popov
2018-01-08 19:00:34 +01:00
parent e409e19bc8
commit acd75a2e6b

View File

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