diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index 36fa9c732c7c168f31e07a875eb29869f29272b5..5cccb456a9845a2fb63e4cb73c706f9e39b26739 100755 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -32,14 +32,16 @@ fi if [[ "$1" == *.ts || "$1" == *.js ]]; then - appFile="/app/$1" + botFile="$1" + botFilePath="/bot/$1" + shift - if [ -f "$appFile" ]; then - echo "Executing ts-node /app/$@" - exec ts-node "/app/$@" + if [ -f "$botFilePath" ]; then + echo "Executing ts-node $botFilePath $@" + exec ts-node "$botFilePath" $@ exit $? else - echo "ERROR: can not found app file: $appfile" + echo "ERROR: can not found bot file: $botFile" exit -1 fi