16 lines
414 B
Bash
Executable File
16 lines
414 B
Bash
Executable File
#!/bin/sh
|
||
|
||
# Store password like this:
|
||
# ´´secret-tool store --label='KeepassPassword' password keepass``
|
||
|
||
DATABASE=~/Nextcloud/Avaimet/Passwords.kdbx
|
||
PW=$(secret-tool lookup password keepass)
|
||
PASSWORDS=$(echo $PW | keepassxc-cli ls -R $DATABASE)
|
||
|
||
for pass in $PASSWORDS; do
|
||
found=$(echo $pass | grep --ignore-case $1)
|
||
if [ -n "$found" ]; then
|
||
echo $PW | keepassxc-cli show -s -q $DATABASE $found &
|
||
fi
|
||
done
|