parent
5da9f26076
commit
44d3ac3a1c
14
abra
14
abra
@ -306,6 +306,18 @@ fi
|
|||||||
|
|
||||||
###### Safety checks
|
###### 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() {
|
require_abra_dir() {
|
||||||
mkdir -p "$ABRA_DIR"
|
mkdir -p "$ABRA_DIR"
|
||||||
}
|
}
|
||||||
@ -819,8 +831,10 @@ sub_app_secret_generate(){
|
|||||||
LENGTH="$abra__length_"
|
LENGTH="$abra__length_"
|
||||||
|
|
||||||
if [[ "$SECRET" == *"password"* ]]; then
|
if [[ "$SECRET" == *"password"* ]]; then
|
||||||
|
require_pwqgen
|
||||||
PWGEN="${abra__cmd_:-pwqgen}"
|
PWGEN="${abra__cmd_:-pwqgen}"
|
||||||
else
|
else
|
||||||
|
require_pwgen
|
||||||
PWGEN=${abra__cmd_:-pwgen -s "$LENGTH" 1}
|
PWGEN=${abra__cmd_:-pwgen -s "$LENGTH" 1}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user