mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
search directory configured via environment
use absolute path to database file
This commit is contained in:
parent
0138209004
commit
3ec29d3b52
@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
### change the path to suit your installation or set KDBX_SEARCH before calling ###
|
||||||
|
: ${KDBX_SEARCH:=~/.KeePass/*.kdbx}
|
||||||
|
|
||||||
PROG="$(basename $0)"
|
PROG="$(basename $0)"
|
||||||
|
|
||||||
function daemon_main {
|
function daemon_main {
|
||||||
@ -11,8 +14,8 @@ function daemon_main {
|
|||||||
|
|
||||||
# fetch KeePass database passwords from kdewallet
|
# fetch KeePass database passwords from kdewallet
|
||||||
declare -A DBs
|
declare -A DBs
|
||||||
### change the path to suit your installation ###
|
for DBPATH in $KDBX_SEARCH; do
|
||||||
for DBPATH in ~/.keepassx/*.kdbx; do
|
[[ -L "$DBPATH" ]] && DBPATH=$(readlink --canonicalize "$DBPATH")
|
||||||
DBs[$DBPATH]=$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.readPassword "$handle" "Passwords" "$DBPATH" "$PROG")
|
DBs[$DBPATH]=$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.readPassword "$handle" "Passwords" "$DBPATH" "$PROG")
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user