From c3a65f222b6b8ef148b65b2a0aa1a1972ba5fcef Mon Sep 17 00:00:00 2001 From: ai-dev Date: Fri, 1 Nov 2024 22:30:08 +0100 Subject: [PATCH] update --- .../rootfs/etc/s6-overlay/s6-rc.d/actrunner/run | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/actrunner/run b/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/actrunner/run index 734ebaf..a17754f 100644 --- a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/actrunner/run +++ b/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/actrunner/run @@ -40,7 +40,15 @@ GITEA_TOKEN=$(bashio::config 'gitea_token') RUNNER_NAME=$(bashio::config 'runner_name') RUNNER_LABEL=$(bashio::config 'runner_label') -exec /usr/local/bin/act_runner register --no-interactive --instance ${GITEA_URL} --token ${GITEA_TOKEN} --name ${RUNNER_NAME} --labels ${RUNNER_LABEL} +# Register the runner +/usr/local/bin/act_runner register --no-interactive --instance "${GITEA_URL}" --token "${GITEA_TOKEN}" --name "${RUNNER_NAME}" --labels "${RUNNER_LABEL}" + +# Check if registration was successful +if [ $? -ne 0 ]; then + bashio::log.error "Failed to register act_runner." + exit 1 +fi + +bashio::log.info "Registration complete. Starting act_runner in daemon mode..." -bashio::log.info "Handing over control to actrunner..." exec exec /usr/local/bin/act_runner daemon \ No newline at end of file