diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2024-10-15 21:41:40 +0100 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2024-10-17 00:04:11 +0100 |
commit | e03697bade96eb19faf43e90e2ed8da86e07b4cc (patch) | |
tree | 91e17890a5fcbe58dc612034938be29554c60021 | |
parent | cc2a1cc3651593fbc5ede99ceab8161c364998f3 (diff) | |
download | unit-e03697bade96eb19faf43e90e2ed8da86e07b4cc.tar.gz unit-e03697bade96eb19faf43e90e2ed8da86e07b4cc.tar.bz2 |
ci: Fix disabling of the mono-xsp4.service
With Ubuntu 24.04 this service is no longer enabled/installed and so
this bit would fail.
This commit makes it handle both cases (installed/not-installed).
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r-- | .github/workflows/ci.yml | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f9bc699..a7d0e715 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,12 +101,18 @@ 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 + set +e + 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 |