From f06d0a1bf302fff6a84c5225fd046636acb53bef Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 11 Aug 2024 15:05:33 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh --- .../local/etc/docker/init.d/zz-act_runner.sh | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh index ae2645b..1bd5d49 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh @@ -364,19 +364,22 @@ __post_execute() { # show message __banner "$postMessageST" # commands to execute - for multi in "$CONF_DIR/multi"/*; do - unset pid is_running name - name="$(basename "$multi")" - if [ -f "$$multi/$name.yaml" ] && [ -f "$multi/runners" ]; then - act_runner daemon --config $multi/$name.yaml & - local 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" + if [ -d "$CONF_DIR/multi" ]; then + for multi in "$CONF_DIR/multi"/*; do + if [ -n "$multi" ]; then + unset pid is_running name + name="$(basename "$multi")" + if [ -f "$$multi/$name.yaml" ] && [ -f "$multi/runners" ]; then + act_runner daemon --config $multi/$name.yaml & + local 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 - 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" & execPid=$! sleep 5 && ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && return 0 || return 2