Skip to content

Commit e03697b

Browse files
committed
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 <[email protected]>
1 parent cc2a1cc commit e03697b

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/ci.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,18 @@ jobs:
101101
# https://github.com/actions/runner-images/issues/2821
102102
- name: Kill mono process
103103
run: |
104-
sudo systemctl stop mono-xsp4.service
105-
sudo systemctl mask mono-xsp4.service
106-
sudo systemctl status mono-xsp4.service || true
107-
PID=$(sudo lsof -t -i :8084)
108-
echo "Killing PID $PID"
109-
sudo kill -9 $PID
104+
set +e
105+
sudo systemctl status mono-xsp4.service
106+
if [ $? -ne 0 ]; then
107+
true
108+
else
109+
sudo systemctl stop mono-xsp4.service
110+
sudo systemctl mask mono-xsp4.service
111+
sudo systemctl status mono-xsp4.service
112+
PID=$(sudo lsof -t -i :8084)
113+
echo "Killing PID $PID"
114+
sudo kill -9 $PID
115+
fi
110116
111117
##
112118
## njs

0 commit comments

Comments
 (0)