diff --git a/dokku.sh b/sbin/dokku_client.sh similarity index 97% rename from dokku.sh rename to sbin/dokku_client.sh index 168a8cb..b74f954 100755 --- a/dokku.sh +++ b/sbin/dokku_client.sh @@ -1,9 +1,6 @@ #!/usr/bin/env bash - set -eo pipefail - [[ $DOKKU_TRACE ]] && set -x - export DOKKU_PORT=${DOKKU_PORT:=22} export DOKKU_HOST=${DOKKU_HOST:=} @@ -147,9 +144,12 @@ main() { [[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP [[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP [[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP" + # echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@" # shellcheck disable=SC2068,SC2086 ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@ } -main "$@" -exit $? +if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then + main "$@" + exit $? +fi