Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJack Thomasson <thomasso@adobe.com>2016-10-25 19:18:23 +0300
committerJack Thomasson <thomasso@adobe.com>2016-10-25 19:18:23 +0300
commit3ec29d3b52181dbe20aacaff6290d40d89703d9c (patch)
tree5ad637e58f059d6ae92ed137f50ed3e0940bebfa /utils
parent01382090046f8560c96d20e84b872dba940a0981 (diff)
search directory configured via environment
use absolute path to database file
Diffstat (limited to 'utils')
-rwxr-xr-xutils/keepassx-kwallet7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/keepassx-kwallet b/utils/keepassx-kwallet
index 7fcb0af69..e0cdcda5e 100755
--- a/utils/keepassx-kwallet
+++ b/utils/keepassx-kwallet
@@ -1,5 +1,8 @@
#!/bin/bash
+### change the path to suit your installation or set KDBX_SEARCH before calling ###
+: ${KDBX_SEARCH:=~/.KeePass/*.kdbx}
+
PROG="$(basename $0)"
function daemon_main {
@@ -11,8 +14,8 @@ function daemon_main {
# fetch KeePass database passwords from kdewallet
declare -A DBs
- ### change the path to suit your installation ###
- for DBPATH in ~/.keepassx/*.kdbx; do
+ for DBPATH in $KDBX_SEARCH; do
+ [[ -L "$DBPATH" ]] && DBPATH=$(readlink --canonicalize "$DBPATH")
DBs[$DBPATH]=$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.readPassword "$handle" "Passwords" "$DBPATH" "$PROG")
done