mirror of
				https://github.com/casjaysdevdocker/gitea
				synced 2025-11-04 07:02:12 -05:00 
			
		
		
		
	🗃️ 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:
		@@ -3,7 +3,7 @@
 | 
				
			|||||||
set -e
 | 
					set -e
 | 
				
			||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
# Function to __log messages with timestamp
 | 
					# 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
 | 
					# Function to cleanup child processes on exit
 | 
				
			||||||
__cleanup() {
 | 
					__cleanup() {
 | 
				
			||||||
@@ -74,8 +74,15 @@ for i in $(seq 1 $RUNNERS_COUNT); do
 | 
				
			|||||||
done
 | 
					done
 | 
				
			||||||
unset i
 | 
					unset i
 | 
				
			||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
__log "All $RUNNERS_COUNT runners started successfully"
 | 
					RUNNERS_ID="$(jobs -p | tr '\n' ' ')"
 | 
				
			||||||
__log "Process IDs: $(jobs -p | tr '\n' ' ')"
 | 
					if [ -n "$RUNNERS_ID" ]; then
 | 
				
			||||||
 | 
						__log "All $RUNNERS_COUNT runners started successfully"
 | 
				
			||||||
 | 
						__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 for all background processes
 | 
				
			||||||
wait
 | 
					wait
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -362,7 +362,7 @@ __post_execute() {
 | 
				
			|||||||
	local postMessageST="Running post commands for $SERVICE_NAME"   # message to show at start
 | 
						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 postMessageEnd="Finished post commands for $SERVICE_NAME" # message to show at completion
 | 
				
			||||||
	local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}"  # set hostname
 | 
						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
 | 
						# wait
 | 
				
			||||||
	sleep $waitTime
 | 
						sleep $waitTime
 | 
				
			||||||
	# execute commands
 | 
						# execute commands
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user