local workspace="${1:?}"
# Install knot
image_install kzonecheck keymgr kjournalprint knotc knotd
- image_install /lib/tmpfiles.d/knot.conf
image_install "${ROOTLIBDIR:?}/system/knot.service"
+ image_install -o /lib/tmpfiles.d/knot.conf
image_install -o /etc/dbus-1/system.d/cz.nic.knotd.conf
image_install -o /etc/default/knot
# Start the services
systemctl unmask systemd-networkd systemd-resolved
systemctl start systemd-networkd systemd-resolved
+# Create knot's runtime dir, since from certain version it's provided only by
+# the package and not created by tmpfiles/systemd
+if [[ ! -d /run/knot ]]; then
+ mkdir -p /run/knot
+ chown -R knot:knot /run/knot
+fi
systemctl start knot
# Wait a bit for the keys to propagate
sleep 4