Add stack and volume as shortcuts to docker

This commit is contained in:
3wc 2020-10-06 20:27:50 +02:00
parent 6598aabc37
commit 66dcaedfd0

21
abra
View File

@ -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