diff --git a/README.md b/README.md index 399a0d4..5b927a2 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ dokku plugin:install https://github.com/dokku/dokku-mongo.git mongo ## commands ``` -mongo:admin Connect via telnet to a mongo service as admin user mongo:clone Create container then copy data from into mongo:connect Connect via telnet to a mongo service +mongo:connect-admin Connect via telnet to a mongo service as admin user mongo:create Create a mongo service with environment variables mongo:destroy Delete the service and stop its container if there are no links left mongo:export > Export a dump of the mongo service database diff --git a/commands b/commands index afdc397..7d972ad 100755 --- a/commands +++ b/commands @@ -19,8 +19,8 @@ case "$1" in "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/subcommands/connect" "$@" ;; - $PLUGIN_COMMAND_PREFIX:admin) - "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/subcommands/admin" "$@" + $PLUGIN_COMMAND_PREFIX:connect-admin) + "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/subcommands/connect-admin" "$@" ;; $PLUGIN_COMMAND_PREFIX:create) diff --git a/subcommands/admin b/subcommands/connect-admin similarity index 93% rename from subcommands/admin rename to subcommands/connect-admin index 54316ec..ac4ac13 100644 --- a/subcommands/admin +++ b/subcommands/connect-admin @@ -4,7 +4,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_BASE_PATH/common/functions" source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions" -mongo-admin-cmd() { +mongo-connect-admin-cmd() { declare desc="connect via mongo to a $PLUGIN_SERVICE service as admin user" local cmd="$PLUGIN_COMMAND_PREFIX:admin" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" @@ -19,4 +19,4 @@ mongo-admin-cmd() { docker exec -i $SERVICE_TTY_OPTS "$SERVICE_NAME" mongo -u admin -p "$PASSWORD" --authenticationDatabase admin "$SERVICE" } -mongo-admin-cmd "$@" +mongo-connect-admin-cmd "$@"