🗃️ Committing everything that changed 🗃️

rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
casjay 2024-08-11 15:05:33 -04:00
parent 07c8321d67
commit f06d0a1bf3
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145

View File

@ -364,19 +364,22 @@ __post_execute() {
# show message # show message
__banner "$postMessageST" __banner "$postMessageST"
# commands to execute # commands to execute
for multi in "$CONF_DIR/multi"/*; do if [ -d "$CONF_DIR/multi" ]; then
unset pid is_running name for multi in "$CONF_DIR/multi"/*; do
name="$(basename "$multi")" if [ -n "$multi" ]; then
if [ -f "$$multi/$name.yaml" ] && [ -f "$multi/runners" ]; then unset pid is_running name
act_runner daemon --config $multi/$name.yaml & name="$(basename "$multi")"
local pid=$! if [ -f "$$multi/$name.yaml" ] && [ -f "$multi/runners" ]; then
sleep 5 && ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && is_running="yes" act_runner daemon --config $multi/$name.yaml &
if [ "$is_running" = "yes" ]; then local pid=$!
echo "$pid" >"$RUN_DIR/act_runner.$name.pid" sleep 5 && ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && is_running="yes"
if [ "$is_running" = "yes" ]; then
echo "$pid" >"$RUN_DIR/act_runner.$name.pid"
fi
fi
fi fi
fi done
done fi
act_runner cache-server --config $CONF_DIR/daemon.yaml -s 0.0.0.0 -p $SERVICE_PORT 2>>/dev/stderr | tee -a -p "$LOG_DIR/act_runner_cache.log" & act_runner cache-server --config $CONF_DIR/daemon.yaml -s 0.0.0.0 -p $SERVICE_PORT 2>>/dev/stderr | tee -a -p "$LOG_DIR/act_runner_cache.log" &
execPid=$! execPid=$!
sleep 5 && ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && return 0 || return 2 sleep 5 && ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && return 0 || return 2