test: More precise firewall configuration
Only enable cockpit in the firewall if it is actually running, not merely installed.
This commit is contained in:
parent
84608a1680
commit
7b1315a3ca
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ set -eux
|
||||||
mkdir -p /etc/cockpit
|
mkdir -p /etc/cockpit
|
||||||
printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf
|
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
|
firewall-cmd --add-service=cockpit --permanent
|
||||||
fi
|
fi
|
||||||
systemctl enable cockpit.socket
|
systemctl enable cockpit.socket
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue