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 5c9d2cb..734ebaf 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 @@ -24,7 +24,7 @@ case "$(bashio::config 'log_level')" in \ fatal) log_level='error' ;; \ *) log_level='info' ;; \ esac; -bashio::log.info "Promtail log level set to ${log_level}" +bashio::log.info "act_runner log level set to ${log_level}" export "JOURNAL_PATH=${journal_path}" export "LOG_LEVEL=${log_level}" @@ -32,5 +32,15 @@ export "LOG_LEVEL=${log_level}" # Activate the Ansible virtual environment source /opt/ansible-venv/bin/activate +bashio::log.info "register act_runner !" + +# Load configuration from Home Assistant +GITEA_URL=$(bashio::config 'gitea_url') +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} + bashio::log.info "Handing over control to actrunner..." exec exec /usr/local/bin/act_runner daemon \ No newline at end of file diff --git a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/run b/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/run deleted file mode 100644 index f7bd9b1..0000000 --- a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/run +++ /dev/null @@ -1,16 +0,0 @@ -#!/command/with-contenv bashio -# shellcheck shell=bash -# ============================================================================== -# Home Assistant Community Add-on: Example -# Example init script, runs before any other service -# ============================================================================== - -bashio::log.info "register act_runner !" - -# Load configuration from Home Assistant -GITEA_URL=$(bashio::config 'gitea_url') -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} \ No newline at end of file diff --git a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/type b/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/type deleted file mode 100644 index bdd22a1..0000000 --- a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/type +++ /dev/null @@ -1 +0,0 @@ -oneshot diff --git a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/up b/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/up deleted file mode 100644 index d4a2c00..0000000 --- a/gitea_act_runner/rootfs/etc/s6-overlay/s6-rc.d/init-actrunner/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-example/run