diff --git a/abra b/abra index 80044ba..32440f1 100755 --- a/abra +++ b/abra @@ -192,6 +192,8 @@ sub_secret_insert() { PW=$3 if [ -z "$SECRET" ] || [ -z "$VERSION" ] || [ -z "$PW" ]; then + error "Required arguments missing" + echo echo "Usage: $PROGRAM_NAME secret insert SECRET VERSION PW" exit fi @@ -205,6 +207,13 @@ sub_secret_generate(){ VERSION=$2 PWGEN=${3:-pwqgen} + if [ -z "$SECRET" ] || [ -z "$VERSION" ]; then + error "Required arguments missing" + echo + echo "Usage: $PROGRAM_NAME secret generate SECRET VERSION [PW]" + exit + fi + PW=$($PWGEN) success "Password: $PW" @@ -431,6 +440,18 @@ sub_upgrade() { curl -fsSL https://install.abra.autonomic.zone | bash } +###### Docker alias subcommands + +sub_stack() { + # shellcheck disable=SC2068 + docker stack $@ +} + +sub_volume() { + # shellcheck disable=SC2068 + docker volume $@ +} + ###### Main SUBCOMMAND=$1