From c7ff84bcb1b5a94065b7448d7e829f474c0ed44c Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 15 Oct 2024 21:41:40 +0100 Subject: [PATCH] ci: Fix disabling of mono-xsp4.service Signed-off-by: Andrew Clayton --- .github/workflows/ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f9bc6991..936440917 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,12 +101,17 @@ jobs: # https://github.com/actions/runner-images/issues/2821 - name: Kill mono process run: | - sudo systemctl stop mono-xsp4.service - sudo systemctl mask mono-xsp4.service - sudo systemctl status mono-xsp4.service || true - PID=$(sudo lsof -t -i :8084) - echo "Killing PID $PID" - sudo kill -9 $PID + sudo systemctl status mono-xsp4.service + if [ $? -ne 0 ]; then + true + else + sudo systemctl stop mono-xsp4.service + sudo systemctl mask mono-xsp4.service + sudo systemctl status mono-xsp4.service + PID=$(sudo lsof -t -i :8084) + echo "Killing PID $PID" + sudo kill -9 $PID + fi ## ## njs