From 56b29e4dd235d1ee002144da7b9d922c909e64bc Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 16 Mar 2024 09:14:30 +0100 Subject: [PATCH] test: More precise firewall configuration Only enable cockpit in the firewall if it is actually running, not merely installed. --- test/vm.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vm.install b/test/vm.install index 7df33c4..84f26f7 100644 --- a/test/vm.install +++ b/test/vm.install @@ -7,7 +7,7 @@ set -eux mkdir -p /etc/cockpit printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf -if type firewall-cmd >/dev/null 2>&1; then +if systemctl is-active -q firewalld.service; then firewall-cmd --add-service=cockpit --permanent fi systemctl enable cockpit.socket