starter-kit/test/vm.install
Martin Pitt 7b1315a3ca test: More precise firewall configuration
Only enable cockpit in the firewall if it is actually running, not
merely installed.
2024-03-18 08:50:36 +01:00

13 lines
428 B
Bash

#!/bin/sh
# image-customize script to prepare a bots VM for testing this application
# The application package will be installed separately
set -eux
# don't force https:// (self-signed cert)
mkdir -p /etc/cockpit
printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf
if systemctl is-active -q firewalld.service; then
firewall-cmd --add-service=cockpit --permanent
fi
systemctl enable cockpit.socket