Add stack
and volume
as shortcuts to docker
This commit is contained in:
parent
6598aabc37
commit
66dcaedfd0
21
abra
21
abra
@ -192,6 +192,8 @@ sub_secret_insert() {
|
|||||||
PW=$3
|
PW=$3
|
||||||
|
|
||||||
if [ -z "$SECRET" ] || [ -z "$VERSION" ] || [ -z "$PW" ]; then
|
if [ -z "$SECRET" ] || [ -z "$VERSION" ] || [ -z "$PW" ]; then
|
||||||
|
error "Required arguments missing"
|
||||||
|
echo
|
||||||
echo "Usage: $PROGRAM_NAME secret insert SECRET VERSION PW"
|
echo "Usage: $PROGRAM_NAME secret insert SECRET VERSION PW"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -205,6 +207,13 @@ sub_secret_generate(){
|
|||||||
VERSION=$2
|
VERSION=$2
|
||||||
PWGEN=${3:-pwqgen}
|
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)
|
PW=$($PWGEN)
|
||||||
|
|
||||||
success "Password: $PW"
|
success "Password: $PW"
|
||||||
@ -431,6 +440,18 @@ sub_upgrade() {
|
|||||||
curl -fsSL https://install.abra.autonomic.zone | bash
|
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
|
###### Main
|
||||||
|
|
||||||
SUBCOMMAND=$1
|
SUBCOMMAND=$1
|
||||||
|
Loading…
Reference in New Issue
Block a user