Correct problems with using Keychain for backup drive credentials

This commit is contained in:
Andrew Miner
2017-08-10 08:16:43 -07:00
parent 306e87c38d
commit b9cee5300e
4 changed files with 20 additions and 23 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ function die {
LOCAL_MOUNT="$HOME/.backup-drive"
if mount | grep -q "$LOCAL_MOUNT"; then
umount "$LOCAL_MOUNT" || die "Could not unmount $LOCAL_MOUNT"
umount "$LOCAL_MOUNT" || die "[$(date)] Could not unmount $LOCAL_MOUNT"
fi
[[ -e "$LOCAL_MOUNT" ]] && rm -r "$LOCAL_MOUNT"
[[ -e "$LOCAL_MOUNT" ]] && rmdir "$LOCAL_MOUNT"
exit 0