update
This commit is contained in:
parent
3201e0b9e6
commit
72a9e00304
@ -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
|
@ -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}
|
@ -1 +0,0 @@
|
||||
oneshot
|
@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-example/run
|
Loading…
x
Reference in New Issue
Block a user