🗃️ Committing everything that changed 🗃️

rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
casjay 2024-08-31 19:12:14 -04:00
parent 4f3ee4a2f0
commit 18d0f2dd9c
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145

View File

@ -59,7 +59,8 @@ printf '%s\n' "# - - - Initializing $SERVICE_NAME - - - #"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Custom functions # Custom functions
__gen_auth_token() { __gen_auth_token() {
local user="${GITEA_USER:-SERVICE_USER}" [ -n "$SYS_AUTH_TOKEN" ] && echo "$SYS_AUTH_TOKEN" && return
local user="${GITEA_USER:-$SERVICE_USER}"
local conf_file="$(find "/config" "/etc" -type f -name '*.ini' | grep -E 'gitea/app.ini|gitea.ini'|head -n1 | grep '^')" local conf_file="$(find "/config" "/etc" -type f -name '*.ini' | grep -E 'gitea/app.ini|gitea.ini'|head -n1 | grep '^')"
[ -f "$conf_file" ] && sudo -u $user gitea --config "$conf_file" actions generate-runner-token 2>/dev/null | grep -v '\.\.\.'||return [ -f "$conf_file" ] && sudo -u $user gitea --config "$conf_file" actions generate-runner-token 2>/dev/null | grep -v '\.\.\.'||return
} }
@ -256,6 +257,7 @@ RUNNER_LABELS="$RUNNER_LABELS"
EOF EOF
fi fi
for runner in "$CONF_DIR/reg"/*.reg; do for runner in "$CONF_DIR/reg"/*.reg; do
[ -f "$runner" ] && . "$runner" [ -f "$runner" ] && . "$runner"
while :; do while :; do