Skip to content

Commit

Permalink
Merge pull request keepassxreboot#59 from jkt628/develop
Browse files Browse the repository at this point in the history
search directory configured via environment
  • Loading branch information
droidmonkey authored Oct 26, 2016
2 parents e97add0 + 3ec29d3 commit fdad028
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utils/keepassx-kwallet
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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

Expand Down

0 comments on commit fdad028

Please sign in to comment.