🗃️ Committing everything that changed 🗃️

rootfs/usr/local/bin/start-runners
rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
casjay
2025-09-17 19:10:47 -04:00
parent ac86c62c64
commit 225c9a4438
2 changed files with 11 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
set -e
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Function to __log messages with timestamp
__log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1"; }
__log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >"$RUNNERS_LOG_DIR/runners" 2>&1; }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Function to cleanup child processes on exit
__cleanup() {
@@ -74,8 +74,15 @@ for i in $(seq 1 $RUNNERS_COUNT); do
done
unset i
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RUNNERS_ID="$(jobs -p | tr '\n' ' ')"
if [ -n "$RUNNERS_ID" ]; then
__log "All $RUNNERS_COUNT runners started successfully"
__log "Process IDs: $(jobs -p | tr '\n' ' ')"
__log "Process IDs: $RUNNERS_ID"
printf 'All %s runners started successfully: %s\n' "$RUNNERS_COUNT" "$RUNNERS_ID"
else
__log "The runners have failed to start"
printf '%s\n' "The runners have failed to start"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Wait for all background processes
wait

View File

@@ -362,7 +362,7 @@ __post_execute() {
local postMessageST="Running post commands for $SERVICE_NAME" # message to show at start
local postMessageEnd="Finished post commands for $SERVICE_NAME" # message to show at completion
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
export SERVER_ADDRESS="$RUNNER_IP_ADDRESS:$GITEA_PORT" SERVER_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" RUNNERS_ENABLE="${RUNNERS_START:-5}" RUNNER_LABELS
export SERVER_ADDRESS="$RUNNER_IP_ADDRESS:$GITEA_PORT" SERVER_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" RUNNERS_ENABLE="${RUNNERS_START:-5}" RUNNER_LABELS RUNNERS_LOG_DIR="$LOG_DIR"
# wait
sleep $waitTime
# execute commands