From 8417896cefd29941b660ea7815f8e37bc76558a7 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 19 Dec 2024 11:39:54 +0000 Subject: [PATCH] Update ensure-pass to clear passwords that can be repopulated automatically --- system/home/scripts/shell/ensure-pass.sh | 28 +++++++----------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/system/home/scripts/shell/ensure-pass.sh b/system/home/scripts/shell/ensure-pass.sh index e073dda4..8129c07c 100644 --- a/system/home/scripts/shell/ensure-pass.sh +++ b/system/home/scripts/shell/ensure-pass.sh @@ -6,33 +6,21 @@ secret-tool lookup email "$EMAIL" >/dev/null || ( ) EMAIL="e.litherlandsmith@icloud.com" -secret-tool lookup email "$EMAIL" >/dev/null || ( - pass show identity/apple.com/mbsync | - head -n1 | - secret-tool store --label="iCloud mbsync" email "$EMAIL" -) +secret-tool lookup clear "$EMAIL" +pass show identity/apple.com/mbsync | head -n1 | secret-tool store --label="iCloud mbsync" email "$EMAIL" EMAIL="evie.litherland-smith@ukaea.uk" -secret-tool lookup email "$EMAIL" >/dev/null || ( - pass show work/microsoftonline.com | - head -n1 | - secret-tool store --label="Outlook mbsync" email "$EMAIL" -) +secret-tool clear email "$EMAIL" +pass show work/microsoftonline.com | head -n1 | secret-tool store --label="Outlook mbsync" email "$EMAIL" # Calendar URL="dav.xenia.me.uk" USER="pixelifytica" -secret-tool lookup url "$URL" user "$USER" >/dev/null || ( - pass show "server/xenia.me.uk/$URL" | - head -n1 | - secret-tool store --label="Personal calendar vdirsyncer" url "$URL" user "$USER" -) +secret-tool clear url "$URL" user "$USER" +pass show "server/xenia.me.uk/$URL" | head -n1 | secret-tool store --label="Personal calendar vdirsyncer" url "$URL" user "$USER" # GitHub API token HOST="api.github.com" USER="pixelifytica^forge" -secret-tool lookup host "$HOST" user "$USER" >/dev/null || ( - pass show "api/$HOST" | - head -n1 | - secret-tool store --label="Forge GitHub Token" host "$HOST" user "$USER" -) +secret-tool clear host "$HOST" user "$USER" +pass show "api/$HOST" | head -n1 | secret-tool store --label="Forge GitHub Token" host "$HOST" user "$USER"