From bd6aebbc8ce53deb6c3c731d3b435986ecf58fe2 Mon Sep 17 00:00:00 2001 From: Merith-TK Date: Wed, 25 Dec 2024 05:50:07 +0000 Subject: [PATCH] shfmt entrypoint.sh --- entrypoint.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 68cc3d2..8202a92 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,8 +26,8 @@ fi # Handle if `command` is passed, as command appends arguments to the entrypoint if [ "$#" -gt 0 ]; then - run_command $@ - exit + run_command $@ + exit fi # Handle and alter the config file @@ -99,19 +99,19 @@ if [[ ! -s "${RUNNER_FILE}" ]]; then while [[ $success -eq 0 ]] && [[ $try -lt ${MAX_REG_ATTEMPTS:-10} ]]; do if [[ ! -z "${FORGEJO_SECRET}" ]]; then run_command forgejo-runner create-runner-file --connect \ - --instance "${FORGEJO_URL:-http://forgejo:3000}" \ - --name "${RUNNER_NAME:-$(hostname)}" \ - --secret "${FORGEJO_SECRET}" \ - ${CONFIG_ARG}\ - ${EXTRA_ARGS} 2>&1 | tee /tmp/reg.log + --instance "${FORGEJO_URL:-http://forgejo:3000}" \ + --name "${RUNNER_NAME:-$(hostname)}" \ + --secret "${FORGEJO_SECRET}" \ + ${CONFIG_ARG} \ + ${EXTRA_ARGS} 2>&1 | tee /tmp/reg.log else run_command forgejo-runner register \ - --instance "${FORGEJO_URL:-http://forgejo:3000}" \ - --name "${RUNNER_NAME:-$(hostname)}" \ - --token "${RUNNER_TOKEN}" \ - --no-interactive \ - ${CONFIG_ARG}\ - ${EXTRA_ARGS} 2>&1 | tee /tmp/reg.log + --instance "${FORGEJO_URL:-http://forgejo:3000}" \ + --name "${RUNNER_NAME:-$(hostname)}" \ + --token "${RUNNER_TOKEN}" \ + --no-interactive \ + ${CONFIG_ARG} \ + ${EXTRA_ARGS} 2>&1 | tee /tmp/reg.log fi cat /tmp/reg.log | grep -E 'connection successful|registered successfully' >/dev/null if [[ $? -eq 0 ]]; then