mirror of
https://github.com/vhaudiquet/mymachine.git
synced 2025-12-18 20:16:05 +00:00
14 lines
305 B
Bash
14 lines
305 B
Bash
#!/usr/bin/env bash
|
|
|
|
alias bw="sudo -u ${USERNAME} bw"
|
|
|
|
bitwarden_is_authenticated() {
|
|
status=$(bw status |jq -r ".status")
|
|
[[ ! ${status} == "unauthenticated" ]]
|
|
}
|
|
bitwarden_is_locked() {
|
|
status=$(bw status |jq -r ".status")
|
|
[[ ${status} == "locked" ]] || ! bitwarden_is_authenticated
|
|
}
|
|
|