parent
5da9f26076
commit
44d3ac3a1c
14
abra
14
abra
@ -306,6 +306,18 @@ fi
|
||||
|
||||
###### Safety checks
|
||||
|
||||
require_pwqgen() {
|
||||
if ! type pwqgen > /dev/null 2>&1; then
|
||||
error "pwqgen program is not installed"
|
||||
fi
|
||||
}
|
||||
|
||||
require_pwgen() {
|
||||
if ! type pwgen > /dev/null 2>&1; then
|
||||
error "pwgen program is not installed"
|
||||
fi
|
||||
}
|
||||
|
||||
require_abra_dir() {
|
||||
mkdir -p "$ABRA_DIR"
|
||||
}
|
||||
@ -819,8 +831,10 @@ sub_app_secret_generate(){
|
||||
LENGTH="$abra__length_"
|
||||
|
||||
if [[ "$SECRET" == *"password"* ]]; then
|
||||
require_pwqgen
|
||||
PWGEN="${abra__cmd_:-pwqgen}"
|
||||
else
|
||||
require_pwgen
|
||||
PWGEN=${abra__cmd_:-pwgen -s "$LENGTH" 1}
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user