25 lines
1.0 KiB
Bash
Executable File
25 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/config"
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
|
|
|
|
service-connect-cmd() {
|
|
#E connect to the service via the $PLUGIN_COMMAND_PREFIX connection tool
|
|
#E > NOTE: disconnecting from ssh while running this command may leave zombie processes due to moby/moby#9098
|
|
#E dokku $PLUGIN_COMMAND_PREFIX:connect lollipop
|
|
#A service, service to run command against
|
|
declare desc="connect to the service via the $PLUGIN_COMMAND_PREFIX connection tool"
|
|
local cmd="$PLUGIN_COMMAND_PREFIX:connect" argv=("$@")
|
|
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
|
declare SERVICE="$1"
|
|
is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented"
|
|
|
|
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service"
|
|
verify_service_name "$SERVICE"
|
|
service_connect "$SERVICE"
|
|
}
|
|
|
|
service-connect-cmd "$@"
|