From abf00b8f1125ea7a025f13dc361b7fb8b0520d15 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Thu, 18 Jan 2024 00:26:43 +0100 Subject: [PATCH] aerc: improve keepassxc helper script --- config/aerc/scripts/wait-for-creds.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/aerc/scripts/wait-for-creds.sh b/config/aerc/scripts/wait-for-creds.sh index 7ab4f102..834c67e4 100755 --- a/config/aerc/scripts/wait-for-creds.sh +++ b/config/aerc/scripts/wait-for-creds.sh @@ -1,8 +1,14 @@ #!/bin/sh +if [ ! "$(pidof keepassxc)" ]; then + echo "KeepassXC not running"; + exit 1 +fi + secret-tool lookup "$1" "$2" # wait until the password is available while [ $? != 0 ]; do secret-tool lookup "$1" "$2" + sleep 5 done -- 2.51.2